Skip to content

Commit 55e4f9b

Browse files
committed
fix UnicodeWarning when exclude command is used with non-latin args
like this: $ caja-dropbox exclude тест $ caja-dropbox exclude тест тест2 it's not the correct command usage, but we don't need a warning anyway
1 parent 343a3fb commit 55e4f9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

caja-dropbox.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,10 +1384,10 @@ Any specified path must be within Dropbox.
13841384
console_print(u"Dropbox daemon stopped.")
13851385
except DropboxCommand.CouldntConnectError, e:
13861386
console_print(u"Dropbox isn't running!")
1387-
elif len(args) == 1 and args[0] == u"list":
1387+
elif len(args) == 1 and args[0].decode(sys.getfilesystemencoding()) == u"list":
13881388
exclude([])
13891389
elif len(args) >= 2:
1390-
sub_command = args[0]
1390+
sub_command = args[0].decode(sys.getfilesystemencoding())
13911391
paths = args[1:]
13921392
absolute_paths = [unicode_abspath(path.decode(sys.getfilesystemencoding())) for path in paths]
13931393
if sub_command == u"add":

0 commit comments

Comments
 (0)