pocket-lib.el
pocket-lib.el copied to clipboard
pocket-lib--save-access-token doesn't create parent directories
with-temp-file
in pocket-lib--save-access-token
errors if file's directory does not exist. I encountered this issue in your pocket reader
package. This leads an error to
pocket-lib--authorize: Opening output file: No such file or directory, c:/msys64/home/repelliuss/.cache/emacs-pocket-lib-token.json
on second call to pocket-reader
which is not obvious as after authorizing you think pocket-reader
couldn't authorize and therefore couldn't create the file but the actual problem is .cache
directory doesn't exist.
It may not be common in Linux systems but I also use MSYS2 environment so it may be a good idea to make sure ~/.cache
directory exists or even ask to create it.