Skip to content

Commit

Permalink
Another #115 unicode/bytestring fix
Browse files Browse the repository at this point in the history
  • Loading branch information
havardgulldahl committed Jul 1, 2016
1 parent c833c67 commit 5892664
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jottalib/jottacloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def excluded(unicodepath, fname):
log.debug("%r excluded by pattern %r", fpath, p.pattern)
return True
return False
for dirpath, dirnames, filenames in os.walk(localtopdir, followlinks=followlinks):
bytestring_localtopdir = _encode_filename_to_filesystem(localtopdir)
for dirpath, dirnames, filenames in os.walk(bytestring_localtopdir, followlinks=followlinks):
# to keep things explicit, and avoid encoding/decoding issues,
# keep a bytestring AND a unicode variant of dirpath
dirpath = _encode_filename_to_filesystem(dirpath)
Expand Down

0 comments on commit 5892664

Please sign in to comment.