Skip to content

Commit

Permalink
Merge pull request #266 from alicia-lyu/master
Browse files Browse the repository at this point in the history
Fix the `OSError: [Errno 30] Read-only file system` problem in newer versions of Anki
  • Loading branch information
sth2018 authored Mar 6, 2024
2 parents 901ebe8 + df4e31b commit e8540a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions addons21/fastwq/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,12 @@ def sound_str(self):
return tmpstr


wp = mw.pm.profileFolder()
mediaPath = os.path.join(wp, "collection.media")
os.chdir(mediaPath)
config = Config(mw)
# credit to https://github.com/AnkiStudio, https://github.com/sth2018/FastWordQuery/issues/259
# fix the `OSError: [Errno 30] Read-only file system: '_fastwqcfg.json'` problem
# when modifying the configurations in newer versions of Anki
# by changing the root to a path with w permission
# tested on MacBook Pro M1 Ventura 13

0 comments on commit e8540a2

Please sign in to comment.