Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy files to tmpdir #4604

Merged
merged 4 commits into from
Feb 8, 2025
Merged

Copy files to tmpdir #4604

merged 4 commits into from
Feb 8, 2025

Conversation

nicodh
Copy link
Member

@nicodh nicodh commented Feb 5, 2025

resolves #4498
resolves #4352

Files are copied to accounts/accountId/tmp/ before opening.

Files that have an ID from deduplication as name are copied to a folder with that name, to assure multiple files with same name do not conflict tmp/fileId/originalFilename.ext

On any start of the app all tmp dirs are deleted again

I didn't find any cases for second point in that issue "Make sure that the actual name of the file isn't shown to the user " - but that might also be checked in reviews

New function to copy files to a tmp dir inside account dir.
Files are copied to that dir and renamed to their original filename to
assure they are handled appropriate in other applications
@Simon-Laux
Copy link
Member

One possible concern is whether account deletion still works on windows if you currently have an attachment open in a different program?

@nicodh
Copy link
Member Author

nicodh commented Feb 6, 2025

One possible concern is whether account deletion still works on windows if you currently have an attachment open in a different program?

The same for restarting the app with a file from tmp dir opened in some app.
Although we don't wait for the cleanup function so probably no harm

@nicodh nicodh merged commit c7bc141 into main Feb 8, 2025
19 checks passed
@nicodh nicodh deleted the copy-files-to-tmpdir branch February 8, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants