From: W. Trevor King Date: Sat, 7 Jul 2012 04:07:36 +0000 (-0400) Subject: Use abspath for gallery.py's base path. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=87deac3d909867c1c2f8718224d2f4e6e05b8d06;p=blog.git 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. --- 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._/-]*$')