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

fix: Prevent refetching PHAsset #1093

Merged
merged 2 commits into from
Jan 9, 2024
Merged

fix: Prevent refetching PHAsset #1093

merged 2 commits into from
Jan 9, 2024

Conversation

PhilippeWeidmann
Copy link
Member

Currently a new file corresponding to the PHAsset is fetched every time an upload session is restarted.
Because of how we get the PHAsset the new file has a new file and is effectively duplicated with a new name. Old files are never cleared because we only clear the new file upon upload completion.

Signed-off-by: Philippe Weidmann <[email protected]>
@PhilippeWeidmann PhilippeWeidmann requested a review from a team as a code owner January 3, 2024 10:08
@adrien-coye
Copy link
Contributor

Let me test it out before I approve it.

@adrien-coye
Copy link
Contributor

So I did double-check, "could we simply use NSTemporaryDirectory ?" :
We do use for the chunks which make sense.
Now I understand it would not be super wise to use it for files been uploaded even if it would work, re-fetching PHAsset on the fly if cleaned after a while.

Copy link

sonarqubecloud bot commented Jan 8, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@adrien-coye
Copy link
Contributor

Got validation in DM, merging now

@adrien-coye adrien-coye merged commit 71b14e6 into master Jan 9, 2024
4 checks passed
@adrien-coye adrien-coye deleted the fix-uploads-clean branch January 9, 2024 08:08
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.

2 participants