Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode File/Directory Names #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions bin/boto-rsync
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ def main():
else:
key_name = cloud_path + get_key_name(root, path) + '/'

key_name = key_name.decode('utf-8')

if ignore_empty and not files:
if not quiet:
sys.stdout.write(
Expand Down Expand Up @@ -539,7 +541,7 @@ def main():
continue

fullpath = os.path.join(root, file)
key_name = cloud_path + get_key_name(fullpath, path)
key_name = (cloud_path + get_key_name(fullpath, path)).decode('utf-8')
file_size = os.path.getsize(fullpath)

if file_size == 0:
Expand All @@ -566,7 +568,7 @@ def main():
fullpath[len(path):].lstrip(os.sep)
)
continue

sys.stdout.write(
'%s\n' %
fullpath[len(path):].lstrip(os.sep)
Expand Down Expand Up @@ -607,6 +609,7 @@ def main():
for file in files:
fullpath = os.path.join(root, file)
key_name = cloud_path + get_key_name(fullpath, path)
key_name = key_name.decode('utf-8')
if key_name in keys:
del(keys[key_name])

Expand All @@ -618,6 +621,7 @@ def main():
key_name = cloud_path + get_key_name(root, path) + \
'/'

key_name = key_name.decode('utf-8')
if key_name in keys:
del(keys[key_name])

Expand Down