insanum / sncli

Simplenote CLI
MIT License
396 stars 34 forks source link

Add `cfg_tempdir` option #44

Closed ashiklom closed 6 years ago

ashiklom commented 6 years ago

This allows users to set their own, possibly more persistent temporary directory. If the parameter is blank (default), the argument is set to None, which is the default for tempfile.NamedTemporaryFile.

Storing temporary files somewhere other than tmp is slightly safer in cases if, say, the computer shuts down abnormally and a note is saved but the editor is still open (before this change, the note's content would be lost since the tmp directory is wiped on restart).

samuelallan72 commented 6 years ago

Nice idea, thanks!