Skip to content

Conversation

@zsolt-marta-bitrise
Copy link
Collaborator

No description provided.

ddPath,
xcodeCachePath,
followSymlinks,
logger,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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


return nil
if fileInfo.Mode()&os.ModeSymlink != 0 {
return collectSymlink(path, fgi, followSymlinks, rootDir, logger)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get it, if a file is symlink, we call collectSymlink on it. But collectSymlink will call collectFileMetadata on the file if it's not a directory. Do I miss something on how the circular method calls are broken?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

collectSymlink() will call resolveSymlink() to resolve the symlink and collect the file info on that target. The resolution is called recursively until we find a regular file, so collectFileMetadata() is called again with the target files only

@zsolt-marta-bitrise zsolt-marta-bitrise merged commit 9aa9b98 into main Sep 11, 2024
@zsolt-marta-bitrise zsolt-marta-bitrise deleted the follow-symlinks branch September 11, 2024 09:59
zsolt-marta-bitrise added a commit that referenced this pull request Sep 12, 2025
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.

3 participants