immich-go icon indicating copy to clipboard operation
immich-go copied to clipboard

Symbolic links are not followed

Open Zlendy opened this issue 1 year ago • 4 comments

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

Zlendy avatar May 03 '24 09:05 Zlendy

Good to know. I'll check that issue

simulot avatar May 03 '24 12:05 simulot

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.

simulot avatar May 04 '24 08:05 simulot

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

Zlendy avatar May 04 '24 22:05 Zlendy

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

simulot avatar May 05 '24 08:05 simulot