time4tea / gopro-dashboard-overlay

Programs to process GoPro MP4 & Generic GPX/FIT files and create video dashboards & maps
GNU General Public License v3.0
327 stars 48 forks source link

clean up tmp file #137

Open blshkv opened 1 year ago

blshkv commented 1 year ago

Fixes https://github.com/time4tea/gopro-dashboard-overlay/issues/135

Context

Keep FS clean

time4tea commented 1 year ago

Hi. I appreciate the effort here... but the proposed solution ignores the reason that the file is kept... which is to be able to review the ffmpeg file after the creation of the video....

By deleting it, it can no longer be viewed...

There are a number er of considerations that need to be balanced here, and currently the one that seems to work, is just leave the file.

Do you have a particular reason you need the file removed, or is it just for correctness? If I understand your issue it may help in coming up with a useful solution.

blshkv commented 1 year ago

hm... The purpose was just to delete a random tmp file. My /tmp directory is a RAM, and I don't reboot my machine very often, it is getting polluted by some leftovers like that one. I didn't expect that a user would be able to find it, or it could be useful in any way. But I see, you want to keep it as a log file. Wouldn't be better to have a prefix at least, something like: "/tmp/gopro-dash_\<random>" ?

tempfile.mkstemp(prefix=source.name...