simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.2k stars 36 forks source link

Symbolic links are not followed #231

Open Zlendy opened 2 months ago

Zlendy commented 2 months ago

I attempted to organize a library of pictures using symlinks to directories before importing them into Immich using this tool, only to realize that it treats symlinks as raw files and does not follow them.

image

simulot commented 2 months ago

Good to know. I'll check that issue

simulot commented 2 months ago

Well... I'm using the standard go library function WalkDir to parse the file system. The document says:

WalkDir does not follow symbolic links found in directories, but if root itself is a symbolic link, its target will be walked.

So this isn't an easy fix. I'll need to refactor the code to handle symlinks properly.

Zlendy commented 2 months ago

Would it be viable to call the WalkDir function for each symlinked directory?

simulot commented 2 months ago

Surely, another way is to get ride of this function, and walk through the folders with basic functions and handle symlinks as we need.