summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-14 16:34:58 +0000
committerAnand Avati <avati@gluster.com>2011-04-15 00:30:53 -0700
commitf689a077d3f0a8c75d7ef083d92ef0faeb2ba5a0 (patch)
tree1905547fc7c3d5751e8566f59c8d7f5fe1b6ade9 /xlators
parent4175e092e3521c1f095d6307ea9b05c7c49b02c6 (diff)
syncdaemon: work around python feature of allowing double leading slashes in canonicalized paths
Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/marker/utils/syncdaemon/resource.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py
index ce855fb715d..c937f80cf8d 100644
--- a/xlators/features/marker/utils/syncdaemon/resource.py
+++ b/xlators/features/marker/utils/syncdaemon/resource.py
@@ -37,7 +37,10 @@ def desugar(ustr):
else:
return "gluster://#{str}"
else:
- return "file://" + os.path.abspath(ustr)
+ ap = os.path.abspath(ustr)
+ if ap.startswith('//'):
+ ap = ap[1:]
+ return "file://" + ap
def parse_url(ustr):
m = UrlRX.match(ustr)