fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
179 stars 24 forks source link

Error changing the default location in the config window #255

Open glazzarelli opened 3 years ago

glazzarelli commented 3 years ago

This is not stricly a problem of the add-on itself but, when I try to change the default location of pdfUrlImportSavePath, Anki prompts me this error (Windows):

Invalid configuration: JSONDecodeError('Invalid\escape: line 104 column 32 (char 3766)')

The solution I came with is to double escaping each escape character in my location path.

fonol commented 3 years ago

Hi, thanks for noticing me, it should probably check for any unescaped backslash and replace it with escaped ones upon save. In general, I just type all the paths with forward slashes to avoid such problems.