projects
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99f376f
)
Use abspath for gallery.py's base path.
author
W. Trevor King
<wking@tremily.us>
Sat, 7 Jul 2012 04:07:36 +0000
(
00:07
-0400)
committer
W. Trevor King
<wking@tremily.us>
Sat, 7 Jul 2012 04:07:36 +0000
(
00:07
-0400)
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
patch
|
blob
|
history
diff --git
a/posts/gallery/gallery.py
b/posts/gallery/gallery.py
index 1f9ad62276edb2eb223ade6318413df46c3020fb..a5354fc67ca7274a1045ac46743952cbcc173561 100755
(executable)
--- 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._/-]*$')