mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't attempt to open directories for writing in getshared
This commit is contained in:
parent
2f42e36ffe
commit
7784cea4b0
1 changed files with 5 additions and 2 deletions
|
@ -220,8 +220,11 @@ class GetShared(QDialog):
|
|||
pd, os.path.dirname(l.filename)))
|
||||
except OSError:
|
||||
pass
|
||||
open(os.path.join(pd, l.filename), "wb").\
|
||||
write(z.read(l.filename))
|
||||
if l.filename.endswith("/"):
|
||||
# directory
|
||||
continue
|
||||
path = os.path.join(pd, l.filename)
|
||||
open(path, "wb").write(z.read(l.filename))
|
||||
else:
|
||||
open(os.path.join(pd, tit + ext), "wb").write(file.read())
|
||||
showInfo(_("Plugin downloaded. Please restart Anki."),
|
||||
|
|
Loading…
Reference in a new issue