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 infinite recursion writing to removable drives mounted to NTFS folders #3415

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

marktucker
Copy link
Contributor

Fix another issue with unresolvable reparse points on Windows. ArchReadLink
can return the passed in path if it refers to an "NT Object Manager" path, and we need to handle this as if it isn't a reparse point, because we can't follow the link.

This generalizes the fix by @seando-adsk in f6c2e82, by handling mounted volumes on Windows and avoiding infinitely recursive calls to TfReadLink by having TfIsLink return false in cases where this bad behavior could arise.

Description of Change(s)

Changed Tf_HasAttribute to remove the reparse point attribute on a directory if TfReadLink returns the original path or an empty string (i.e. we couldn't follow the link). This means TfIsLink returns false in these cases, preventing recursive calls to TfReadLink because we always call TfIsLink before calling TfReadLink.

Fixes Issue(s)

#3414

Checklist

[ X ] I have created this PR based on the dev branch

[ X ] I have followed the coding conventions

[ ] I have added unit tests that exercise this functionality
Unit testing this is basically impossible given the complex steps required to set up the USB drive appropriately.

[ X ] I have verified that all unit tests pass with the proposed changes

[ X ] I have submitted a signed Contributor License Agreement (Reference:

…adLink

can return the passed in path if it refers to an "NT Object Manager" path,
and we need to handle this as if it isn't a reparse point, because we can't
follow the link.

This generalizes the fix by @seando-adsk in f6c2e82, by handling mounted
volumes on Windows and avoiding infinitely recursive calls to TfReadLink
by having TfIsLink return false in cases where this bad behavior
could arise.
@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10419

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@asluk asluk added the needs review Issue needing input/review by the repo maintainer (Pixar) label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue needing input/review by the repo maintainer (Pixar)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants