mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
when reconnecting media, update cwd
This commit is contained in:
parent
83f49246e3
commit
5dc69ecd47
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ class MediaManager(object):
|
||||||
return
|
return
|
||||||
path = self.dir()+".db"
|
path = self.dir()+".db"
|
||||||
create = not os.path.exists(path)
|
create = not os.path.exists(path)
|
||||||
|
os.chdir(self._dir)
|
||||||
self.db = DB(path)
|
self.db = DB(path)
|
||||||
if create:
|
if create:
|
||||||
self._initDB()
|
self._initDB()
|
||||||
|
|
Loading…
Reference in a new issue