mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
store media folder as unicode so we can log updated files in unicode
This commit is contained in:
parent
0843db03fd
commit
1f95045621
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,9 @@ class MediaManager(object):
|
|||
self.col = col
|
||||
# media directory
|
||||
self._dir = re.sub("(?i)\.(anki2)$", ".media", self.col.path)
|
||||
# convert dir to unicode if it's not already
|
||||
if isinstance(self._dir, str):
|
||||
self._dir = unicode(self._dir, sys.getfilesystemencoding())
|
||||
if not os.path.exists(self._dir):
|
||||
os.makedirs(self._dir)
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue