Fixes string decode with drag-and-drop and non-ASCII chars
This commit is contained in:
parent
42433e0262
commit
bfafe1780e
@ -1929,7 +1929,10 @@ class FileSwitchManager(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def notifyUserIfFileNotInMediaDirectory(self, filenameToFind, path):
|
def notifyUserIfFileNotInMediaDirectory(self, filenameToFind, path):
|
||||||
path = path.decode('utf-8')
|
try:
|
||||||
|
path = path.decode('utf-8')
|
||||||
|
except UnicodeEncodeError:
|
||||||
|
pass
|
||||||
directoryToFind = os.path.dirname(path)
|
directoryToFind = os.path.dirname(path)
|
||||||
if directoryToFind in self.mediaDirectoriesNotFound:
|
if directoryToFind in self.mediaDirectoriesNotFound:
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user