From f689a077d3f0a8c75d7ef083d92ef0faeb2ba5a0 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Thu, 14 Apr 2011 16:34:58 +0000 Subject: syncdaemon: work around python feature of allowing double leading slashes in canonicalized paths Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570 --- xlators/features/marker/utils/syncdaemon/resource.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/features/marker/utils') 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) -- cgit