Skip to content

clean up tmp file#137

Open
blshkv wants to merge 2 commits intotime4tea:mainfrom
blshkv:patch-1
Open

clean up tmp file#137
blshkv wants to merge 2 commits intotime4tea:mainfrom
blshkv:patch-1

Conversation

@blshkv
Copy link

@blshkv blshkv commented Jun 19, 2023

Fixes #135

Context

Keep FS clean

blshkv added 2 commits June 19, 2023 23:40
required for os.remove
@time4tea
Copy link
Owner

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
Copy link
Author

blshkv commented Jun 19, 2023

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cleanup temporary files

2 participants