This commit is contained in:
Jean-Paul Calderone 2021-01-12 10:46:04 -05:00
parent db31d2bc1a
commit 82d24bfaf7

View File

@ -101,7 +101,7 @@ def argv_to_abspath(s, **kwargs):
Convenience function to decode an argv element to an absolute path, with ~ expanded.
If this fails, raise a UsageError.
"""
decoded = unicode(s, "utf-8")
decoded = argv_to_unicode(s)
if decoded.startswith(u'-'):
raise usage.UsageError("Path argument %s cannot start with '-'.\nUse %s if you intended to refer to a file."
% (quote_output(s), quote_output(os.path.join('.', s))))