X-Git-Url: https://git.rkrishnan.org/?a=blobdiff_plain;f=src%2Fallmydata%2Futil%2Fencodingutil.py;h=e18b854f2c5462de432cc81d16c16dda0ecdec37;hb=397139ad0330cdc90c2105acb32622c5f893363e;hp=f97c4822c1a7b072f3181f9f3019efd288864333;hpb=2dcdb5a4375157ae834cda58b0d7c6814ce8cc82;p=tahoe-lafs%2Ftahoe-lafs.git diff --git a/src/allmydata/util/encodingutil.py b/src/allmydata/util/encodingutil.py index f97c4822..e18b854f 100644 --- a/src/allmydata/util/encodingutil.py +++ b/src/allmydata/util/encodingutil.py @@ -96,7 +96,7 @@ def argv_to_unicode(s): raise usage.UsageError("Argument %s cannot be decoded as %s." % (quote_output(s), io_encoding)) -def argv_to_abspath(s): +def argv_to_abspath(s, long_path=True): """ Convenience function to decode an argv element to an absolute path, with ~ expanded. If this fails, raise a UsageError. @@ -105,7 +105,7 @@ def argv_to_abspath(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)))) - return abspath_expanduser_unicode(decoded) + return abspath_expanduser_unicode(decoded, long_path=long_path) def unicode_to_argv(s, mangle=False): """