From 8ec62d5e2e830de3fae3760d12c025ff6f8875ac Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 30 Jan 2016 00:39:25 +0100 Subject: [PATCH] use os.path.normpath on repository paths, fixes #606 this does NOT fix absolute vs. relative path usage, but as this also deals with remote paths, this can't be done in general. --- borg/helpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/borg/helpers.py b/borg/helpers.py index 7d592952c..3775e293c 100644 --- a/borg/helpers.py +++ b/borg/helpers.py @@ -688,20 +688,20 @@ class Location: self.user = m.group('user') self.host = m.group('host') self.port = m.group('port') and int(m.group('port')) or None - self.path = m.group('path') + self.path = os.path.normpath(m.group('path')) self.archive = m.group('archive') return True m = self.file_re.match(text) if m: self.proto = m.group('proto') - self.path = m.group('path') + self.path = os.path.normpath(m.group('path')) self.archive = m.group('archive') return True m = self.scp_re.match(text) if m: self.user = m.group('user') self.host = m.group('host') - self.path = m.group('path') + self.path = os.path.normpath(m.group('path')) self.archive = m.group('archive') self.proto = self.host and 'ssh' or 'file' return True