Commit 74a4fc94 authored by Klaus Aehlig's avatar Klaus Aehlig

gnt-cluster copyfile: accept relative paths

If, on the command line, the argument to gnt-cluster copyfile is
a relative path, consider this a shorthand for the corresponding
absolute path.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent 85530402
......@@ -522,6 +522,8 @@ def ClusterCopyFile(opts, args):
"""
filename = args[0]
filename = os.path.abspath(filename)
if not os.path.exists(filename):
raise errors.OpPrereqError("No such filename '%s'" % filename,
errors.ECODE_INVAL)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment