mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
change to media dir when it's created
This commit is contained in:
parent
1abd3f4216
commit
b3be3772fb
1 changed files with 2 additions and 0 deletions
|
@ -1365,6 +1365,8 @@ where id = :id""", pending)
|
|||
if not os.path.exists(dir) and create:
|
||||
try:
|
||||
os.mkdir(dir)
|
||||
# change to the current dir
|
||||
os.chdir(dir)
|
||||
except OSError:
|
||||
# permission denied
|
||||
return None
|
||||
|
|
Loading…
Reference in a new issue