summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-04-18 17:21:21 +0000
committerAnand Avati <avati@gluster.com>2011-04-19 02:29:54 -0700
commit7280a000aaea2d6c6294a82f64a626714cbe2702 (patch)
treeea2afbf5c084bc488ac863d2694a361285f54b61 /xlators
parentc6a18b8db0719c0d86c412de6eb386419777d871 (diff)
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 <csaba@lowlife.hu> Signed-off-by: Anand Avati <avati@gluster.com> 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
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/marker/utils/syncdaemon/resource.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py
index 45953727647..07508c73cfe 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