mirror of
https://github.com/Syncplay/syncplay
synced 2025-03-05 11:17:32 +00:00
Only try decoding utf-8 filepath for getsize as last resort, to prevent MPC-HC issues
This commit is contained in:
parent
c6318351a0
commit
0ecf7a585c
@ -368,10 +368,13 @@ class SyncplayClient(object):
|
||||
if not path:
|
||||
return
|
||||
try:
|
||||
path = path.decode('utf-8')
|
||||
size = os.path.getsize(path)
|
||||
except OSError: # file not accessible (stream?)
|
||||
size = 0
|
||||
except:
|
||||
try:
|
||||
path = path.decode('utf-8')
|
||||
size = os.path.getsize(path)
|
||||
except:
|
||||
size = 0
|
||||
filename, size = self.__executePrivacySettings(filename, size)
|
||||
self.userlist.currentUser.setFile(filename, duration, size)
|
||||
self.sendFile()
|
||||
|
Loading…
Reference in New Issue
Block a user