[bfss] ensure base name doesn't contain path separator stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 20 May 2010 10:40:33 +0200
branchstable
changeset 5549 ab3a69a34626
parent 5548 d29d1a1ce15d
child 5550 b143444dc08a
[bfss] ensure base name doesn't contain path separator
server/sources/storages.py
--- a/server/sources/storages.py	Thu May 20 10:40:55 2010 +0200
+++ b/server/sources/storages.py	Thu May 20 10:40:33 2010 +0200
@@ -82,7 +82,7 @@
 
     XXX subject to race condition.
     """
-    path = osp.join(dirpath, basename)
+    path = osp.join(dirpath, basename.replace(osp.sep, '-'))
     if not osp.isfile(path):
         return path
     base, ext = osp.splitext(path)