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): follow symlinks when zipping assets #11685

Merged
merged 2 commits into from
Aug 13, 2024
Merged

fix(server): follow symlinks when zipping assets #11685

merged 2 commits into from
Aug 13, 2024

Conversation

C-Otto
Copy link
Contributor

@C-Otto C-Otto commented Aug 10, 2024

fixes #9335

@C-Otto C-Otto requested a review from danieldietzler as a code owner August 10, 2024 15:05
@C-Otto C-Otto marked this pull request as draft August 10, 2024 15:05
@C-Otto C-Otto marked this pull request as ready for review August 11, 2024 19:33
@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 11, 2024

This works fine on my instance, but I'm unsure of how the test code works on filesystems that don't support symlinks (Windows?). Furthermore, as git annex protects files by marking them as read-only, the corresponding attributes are also used for the ZIP file returned by immich. It'd be a bit more convenient to have those files with rw-r-r flags instead - but that might be an unrelated fix.

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.

I changed the realpath to a repo call, which made the test a lot easier to write. I also added mode: 644, which sets the mode on the file in the archive. Do you want to re-test it on your library?

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 13, 2024

Thanks, that works like a charm! 🚀

@jrasm91 jrasm91 merged commit df45ef0 into immich-app:main Aug 13, 2024
20 of 22 checks passed
@C-Otto C-Otto deleted the follow-symlinks branch August 13, 2024 15:43
Yuvi-raj-P pushed a commit to Yuvi-raj-P/immich that referenced this pull request Aug 19, 2024
* follow symlinks when zipping assets

fixes immich-app#9335

* chore: clean up

---------

Co-authored-by: Jason Rasmussen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Symlinked photos in external library download as a zip of symlinks
3 participants