Commit Graph

18 Commits

Author SHA1 Message Date
Jean-Paul Calderone
6b16afaa2e Avoid using the list comprehension loop variable
It works fine but it relies on leaky scopes.
2018-04-26 15:16:00 -04:00
Daira Hopwood
b53efdbf8b Fix a corner case for to_filepath on Windows to make it consistent with Unix.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
b6b638efd1 Depend on FilePath.asTextMode().
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
903c6f1d6c Fix check for initial '-' in argv_to_abspath.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
David Stainton
16275cb8f6 Teach magic-folder join to use argv_to_abspath
- also we modify argv_to_abspath to through a usage error
if the name starts with a '-'

- add a test
currently the tests fail
2016-07-21 12:35:59 -07:00
Daira Hopwood
e03a1e3361 WIP.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
7b4067850f Unicode path fixes for drop-upload.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-21 12:35:59 -07:00
Daira Hopwood
f2824459eb Reject path arguments that start with '-' with a usage error.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-12-28 21:27:15 +00:00
Daira Hopwood
21226cbb82 Add from_utf8_or_none and tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-03-24 16:46:40 +00:00
Daira Hopwood
95f98e1aae Quote local paths correctly. refs #2235
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2015-01-30 00:05:20 +00:00
David-Sarah Hopwood
07c26ff805 Only quote newline characters where necessary. fixes #1484
Signed-off-by: David-Sarah Hopwood <david-sarah@jacaranda.org>
2013-03-07 16:22:47 +00:00
david-sarah
f9d218c673 encodingutil: argv and output encodings are always the same on all platforms. Lose the unnecessary generality of them being different. fixes #1120 2011-06-29 11:53:56 -07:00
david-sarah
37b07a545f Changes to Tahoe needed to work with new zetuptoolz (that does not use .exe wrappers on Windows), and to support Unicode arguments and stdout/stderr -- v5 2010-07-25 01:32:16 -07:00
david-sarah
f036dfaa4b Fix test failures due to Unicode basedir patches. 2010-07-24 18:03:18 -07:00
david-sarah
28e6ad51a7 util.encodingutil: change quote_output to do less unnecessary escaping, and to use double-quotes more consistently when needed. This version avoids u-escaping for characters that are representable in the output encoding, when double quotes are used, and includes tests. fixes #1135 2010-07-23 00:53:14 -07:00
david-sarah
11b18824c7 util.fileutil, test.test_util: add abspath_expanduser_unicode function, to work around <http://bugs.python.org/issue3426>. util.encodingutil: add a convenience function argv_to_abspath. 2010-07-21 16:15:07 -07:00
david-sarah
a8161c915a Correct stringutils->encodingutil patch to be the newer version, rather than the old version that was committed in error. 2010-07-17 18:34:35 -07:00
david-sarah
11077ea74d Rename stringutils to encodingutil, and drop listdir_unicode and open_unicode (since the Python stdlib functions work fine with Unicode paths). Also move some utility functions to fileutil. 2010-07-11 17:30:15 -07:00