Skip to content
Permalink
Browse files

fixed 'exclude command raise UnicodeDecodeError'

  • Loading branch information...
toaco authored and raveit65 committed May 19, 2017
1 parent 5543711 commit a939670f3ff160fa5fc79eca3f30f9a7504f7316
Showing with 6 additions and 5 deletions.
  1. +6 −5 caja-dropbox.in
@@ -100,14 +100,15 @@ def relpath(path, start=curdir):
if not path:
raise ValueError("no path specified")

if type(start) is unicode:
start_list = unicode_abspath(start).split(sep)
else:
start_list = abspath(start).split(sep)

if type(path) is unicode:
if isinstance(start,str):
start = start.decode(sys.getfilesystemencoding())
start_list = unicode_abspath(start).split(sep)
path_list = unicode_abspath(path).split(sep)
else:
if isinstance(start,unicode):
start = start.encode(sys.getfilesystemencoding())
start_list = abspath(start).split(sep)
path_list = abspath(path).split(sep)

# Work out how much of the filepath is shared by start and path.

0 comments on commit a939670

Please sign in to comment.
You can’t perform that action at this time.