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(server): delete thumbnail for readonly asset #8593

Merged
merged 6 commits into from
Apr 8, 2024

Conversation

Ynng
Copy link
Contributor

@Ynng Ynng commented Apr 7, 2024

Closes #4863
Deletes thumbnail and other generated files for read-only assets

This is safe as only external library files use the "isReadOnly" boolean

@bo0tzz bo0tzz added 🗄️server external-library Issues related to external libraries labels Apr 7, 2024
Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sidecar file isn't necessarily generated by immich.

@Ynng
Copy link
Contributor Author

Ynng commented Apr 7, 2024

I'm not familiar with sidecar files tbh.
What are some common ways people use them?

Is it safe to assume sidecar files of external assets are also external?

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the value of from external when an asset is deleted here?

@Ynng
Copy link
Contributor Author

Ynng commented Apr 7, 2024

In handleAssetDeletion, for external assets, there's a guard clause making sure fromExternal is true.
In the test case the readonly asset is not external and fromExternal is false.

@Ynng Ynng requested a review from danieldietzler April 8, 2024 00:53
@jrasm91 jrasm91 merged commit 7a16233 into immich-app:main Apr 8, 2024
23 checks passed
@Ynng Ynng deleted the delete-thumbnails-from-external branch April 8, 2024 16:54
@malavolti
Copy link
Contributor

Dear @Ynng and @danieldietzler,

I'm using the latest version of Immich (1.102.3) and I currently have 18874 Untracked files:

immich-untracked-files

from an external directory that I've removed in the past.

Can you help me to solve this issue, please?

Thank you so much!

@danieldietzler
Copy link
Member

@malavolti This is not something that should be discussed in a closed PR. Could you open a community Q&A post or hop onto our discord?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-library Issues related to external libraries 🗄️server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] UNTRACKS FILES after deleting external library
5 participants