sophacles / vim-processing

Create and run processing sketches in Vim. Development repository for vim script 2115.
149 stars 10 forks source link

Temp file location. #6

Open schuelaw opened 11 years ago

schuelaw commented 11 years ago

Right now temp files are going into /tmp/vim-processing (at least in linux). If more than one user on a machine is using vim-processing, then the second user loses write permission to /tmp/vim-processing and can't launch a sketch.

A half-measure would be to delete /tmp/vim-processing after each run. A better measure would be to make the temp file location unique to each user (and to delete it after each run).

schuelaw commented 11 years ago

On a side note, really lovely plugin. Fantastically useful when grading numerous sketches from numerous students. Thanks a bunch!

sophacles commented 11 years ago

Thanks for the heads up on that. I know that the solution (roughly) is to have the script check for posix, then the shellouts will need to use mktemp for the dir. Not sure of all the details, including deletions etc, but thats the start of it.

I'm not sure I'll have time to actively work on this issue for a little while, but will if it's still here when I get the chance. If you want to take a stab at it in the mean time, I'd be glad to merge something!

schuelaw commented 11 years ago

On linux, you could simply append the userid to the temp file location. I assume that windows has userid's too? I'll think a bit about it after my semester ends. Again, nice work on the script.