mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-25 13:29:45 +00:00
Move unicode conversion higher up.
This commit is contained in:
parent
ae739dfd9e
commit
7349855ce4
src/allmydata/scripts
@ -27,6 +27,8 @@ def list(options):
|
||||
except UnknownAliasError as e:
|
||||
e.display(stderr)
|
||||
return 1
|
||||
|
||||
path = unicode(path, "utf-8")
|
||||
url = nodeurl + "uri/%s" % url_quote(rootcap)
|
||||
if path:
|
||||
# move where.endswith check here?
|
||||
@ -64,7 +66,6 @@ def list(options):
|
||||
print(quote_output(data, quotemarks=False), file=stderr)
|
||||
return 1
|
||||
|
||||
path = unicode(path, "utf-8")
|
||||
nodetype, d = parsed
|
||||
children = {}
|
||||
if nodetype == "dirnode":
|
||||
|
@ -27,6 +27,7 @@ def mv(options, mode="move"):
|
||||
except UnknownAliasError as e:
|
||||
e.display(stderr)
|
||||
return 1
|
||||
from_path = unicode(from_path, "utf-8")
|
||||
from_url = nodeurl + "uri/%s" % url_quote(rootcap)
|
||||
if from_path:
|
||||
from_url += "/" + escape_path(from_path)
|
||||
@ -46,10 +47,10 @@ def mv(options, mode="move"):
|
||||
e.display(stderr)
|
||||
return 1
|
||||
to_url = nodeurl + "uri/%s" % url_quote(rootcap)
|
||||
path = unicode(path, "utf-8")
|
||||
if path:
|
||||
to_url += "/" + escape_path(path)
|
||||
|
||||
from_path = unicode(from_path, "utf-8")
|
||||
if to_url.endswith("/"):
|
||||
# "mv foo.txt bar/" == "mv foo.txt bar/foo.txt"
|
||||
to_url += escape_path(from_path[from_path.rfind("/")+1:])
|
||||
|
Loading…
x
Reference in New Issue
Block a user