From 7280a000aaea2d6c6294a82f64a626714cbe2702 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Mon, 18 Apr 2011 17:21:21 +0000 Subject: syncdaemon: don't accept simple identifiers anymore as sugared urls - we want to enforce the separation of the volume name and the url namespaces - resolving simple ids as relative paths was lame anyway Signed-off-by: Csaba Henk Signed-off-by: Anand Avati BUG: 2786 (Having to prepend geo-replication master vol with colon spoils the UI) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2786 --- xlators/features/marker/utils/syncdaemon/resource.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index 459537276..07508c73c 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -35,7 +35,9 @@ def desugar(ustr): else: return "gluster://#{str}" else: - ap = os.path.abspath(ustr) + if ustr[0] != '/': + raise RuntimeError("cannot resolve sugared url '%s'" % ustr) + ap = os.path.normpath(ustr) if ap.startswith('//'): ap = ap[1:] return "file://" + ap -- cgit