asamuzaK / withExEditorHost

Native messaging host for withExEditor
MIT License
33 stars 8 forks source link

Set location of temporary files #114

Closed mb720 closed 2 years ago

mb720 commented 2 years ago

Is it possible to define the directory of the temporary files that withExEditor uses?

I see that withExEditor uses /tmp/ for its files currently.

The reason for this request is that after my machine crashed today, I lost some data since /tmp is of type tmpfs that loses its data when the machine is shut down. I'd like to use a different, non-volatile, directory in the future, if possible.

Thanks in advance!

asamuzaK commented 2 years ago

It is possible to add an option to set the location of temporary files.

However, I personally would not want to implement a feature that allows the host to read / write files in arbitrary location.

What you want, in essence, is an automatic backup feature, and I would recommend using an editor that has such a feature.

mb720 commented 2 years ago

Fair enough, I'll use Vim's backup features.