mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
make syncName work with foreign chars
This commit is contained in:
parent
ca9aeaa086
commit
f247133ed8
1 changed files with 2 additions and 2 deletions
|
@ -3111,7 +3111,7 @@ Return new path, relative to media dir."""
|
||||||
# and the variable is not synced
|
# and the variable is not synced
|
||||||
|
|
||||||
def enableSyncing(self):
|
def enableSyncing(self):
|
||||||
self.syncName = unicode(checksum(self.path))
|
self.syncName = unicode(checksum(self.path.encode("utf-8")))
|
||||||
self.lastSync = 0
|
self.lastSync = 0
|
||||||
self.s.commit()
|
self.s.commit()
|
||||||
|
|
||||||
|
@ -3124,7 +3124,7 @@ Return new path, relative to media dir."""
|
||||||
return self.syncName
|
return self.syncName
|
||||||
|
|
||||||
def checkSyncHash(self):
|
def checkSyncHash(self):
|
||||||
if self.syncName and self.syncName != checksum(self.path):
|
if self.syncName and self.syncName != checksum(self.path.encode("utf-8")):
|
||||||
self.notify(_("""\
|
self.notify(_("""\
|
||||||
Because '%s' has been moved or copied, automatic synchronisation \
|
Because '%s' has been moved or copied, automatic synchronisation \
|
||||||
has been disabled. (ERR-0100)""") % self.name())
|
has been disabled. (ERR-0100)""") % self.name())
|
||||||
|
|
Loading…
Reference in a new issue