[copr/copr] 01/01: [frontend] append / to result_dir_url
by git repository hosting
This is an automated email from the git hooks/post-receive script.
msuchy pushed a commit to branch master
in repository copr/copr.
commit 856c50ed992d616c2d2a63b2872ef9972db148c6
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Mon Sep 4 14:22:35 2017 +0200
[frontend] append / to result_dir_url
Otherwise wget in copr-cli does not treat last part as directory and when requested to
wget -r --no-parent https://copr-be.cloud.fedoraproject.org/results/opuk/duplicity/epel-6-x86...
it will also download anything in:
https://copr-be.cloud.fedoraproject.org/results/opuk/duplicity/epel-6-x86...
which is basicaly all builds.
---
frontend/coprs_frontend/coprs/models.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/models.py b/frontend/coprs_frontend/coprs/models.py
index b429b26..4a1c378 100644
--- a/frontend/coprs_frontend/coprs/models.py
+++ b/frontend/coprs_frontend/coprs/models.py
@@ -8,6 +8,7 @@ import base64
import modulemd
from sqlalchemy.ext.associationproxy import association_proxy
+from six.moves.urllib.parse import urljoin
from libravatar import libravatar_url
import zlib
@@ -993,9 +994,9 @@ class BuildChroot(db.Model, helpers.Serializer):
@property
def result_dir_url(self):
- return "/".join([app.config["BACKEND_BASE_URL"],
- u"results",
- self.result_dir])
+ return urljoin(app.config["BACKEND_BASE_URL"],
+ os.path.join("results", self.result_dir, "")
+ )
@property
def result_dir(self):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
6 years, 6 months