litex icon indicating copy to clipboard operation
litex copied to clipboard

Checking settings file existence before attempting to read them

Open Gijom opened this issue 8 years ago • 3 comments

Thanks for this great plugin. However after installation I was constantly having troubles with errors of the type ENOENT "Could not find file /path/to/local/config/litexrc and /path/to/latexfile/.litexrc". Of course creating those files would resolve the problem but why bothering when the plugin works out of the box ?

Solution: I just added a line for testing the existence of these files before opening them in the function load-settings and used the files/file? LT function for that purpose.

Gijom avatar Apr 21 '16 09:04 Gijom

Out of curiousity, are you using LT 0.8? This isn't a problem in 0.7, so I'm wondering if this was introduced in the switch to Electron.

rschroll avatar Apr 21 '16 17:04 rschroll

Yes I do have LT 0.8.1. Note that the plugin was working despite of the error messages (6 error messages in total, 3 per local/wide settings). The proposed modification solved the problem (at least for me).

Gijom avatar Apr 21 '16 19:04 Gijom

Glad to hear it's (mostly) working. I still haven't gotten around to the upgrade, and I wasn't sure if anything would be broken. I'll merge in the change shortly.

Thanks!

rschroll avatar Apr 21 '16 19:04 rschroll