summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@cs2s.cs>2014-11-09 21:00:59 +0000
committerCarl Hetherington <carl@cs2s.cs>2014-11-09 21:00:59 +0000
commit08e04818d89439377e8597eb9a0d42fcfc80c380 (patch)
treee7f6a4f64e0199a4c0904b56a2b8536f8e90cc0f
parentcc5f1411e88afcf940c339c605f36c01e28c97f4 (diff)
Fix output paths like host:path
-rwxr-xr-xcdist5
1 files changed, 4 insertions, 1 deletions
diff --git a/cdist b/cdist
index c8b22bc..d6fbb0a 100755
--- a/cdist
+++ b/cdist
@@ -612,8 +612,11 @@ def main():
if args.output.find(':') == -1:
# This isn't of the form host:path so make it absolute
args.output = os.path.abspath(args.output) + '/'
+ else:
+ if args.output[-1] != ':' and args.output[-1] != '/':
+ args.output += '/'
- # Now, args.output is 'host:' or 'path/'
+ # Now, args.output is 'host:', 'host:path/' or 'path/'
if args.work is not None:
args.work = os.path.abspath(args.work)