From 87deac3d909867c1c2f8718224d2f4e6e05b8d06 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 7 Jul 2012 00:07:36 -0400 Subject: [PATCH] Use abspath for gallery.py's base path. Otherwise the base path is ignored when os.path.join() is used to connect it with a URL that starts with a slash. --- posts/gallery/gallery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/gallery/gallery.py b/posts/gallery/gallery.py index 1f9ad62..a5354fc 100755 --- a/posts/gallery/gallery.py +++ b/posts/gallery/gallery.py @@ -126,7 +126,7 @@ class CGIGalleryServer (object): def __init__(self, base_path='/var/www/localhost/htdocs/gallery/', base_url='/cgi-bin/gallery.py', cache_path='/tmp/gallery-cache/'): - self._base_path = base_path + self._base_path = _os_path.abspath(base_path) self._base_url = base_url self._cache_path = cache_path self._url_regexp = _re.compile('^[a-z0-9._/-]*$') -- 2.26.2