We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5543711 commit a939670Copy full SHA for a939670
1 file changed
caja-dropbox.in
@@ -100,14 +100,15 @@ def relpath(path, start=curdir):
100
if not path:
101
raise ValueError("no path specified")
102
103
- if type(start) is unicode:
104
- start_list = unicode_abspath(start).split(sep)
105
- else:
106
- start_list = abspath(start).split(sep)
107
-
108
if type(path) is unicode:
+ if isinstance(start,str):
+ start = start.decode(sys.getfilesystemencoding())
+ start_list = unicode_abspath(start).split(sep)
109
path_list = unicode_abspath(path).split(sep)
110
else:
+ if isinstance(start,unicode):
+ start = start.encode(sys.getfilesystemencoding())
111
+ start_list = abspath(start).split(sep)
112
path_list = abspath(path).split(sep)
113
114
# Work out how much of the filepath is shared by start and path.
0 commit comments