-
Notifications
You must be signed in to change notification settings - Fork 92
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
Patched os.symlink
mishandles directory descriptors
#968
Labels
Comments
Thanks, that looks like an obvious bug, together with an incorrect or missing test. |
mrbean-bremen
added a commit
to mrbean-bremen/pyfakefs
that referenced
this issue
Mar 10, 2024
- also removed check for supported dirfd where not used - changed dirfd tests to run both in the fake and real OS - fixed pytest-dev#968
5 tasks
mrbean-bremen
added a commit
that referenced
this issue
Mar 10, 2024
- also removed check for supported dirfd where not used - changed dirfd tests to run both in the fake and real OS - fixed #968
As usually: please test in main. |
This appears to be fixed. Thanks again! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The
os.symlink
function accepts adir_fd
argument to specify the destination of the created symlink. The fakefsos.symlink
is behaves incorrectly and uses thedir_fd
to rewrite thesrc
argument:The
src
argument should be left verbatim as given. I am guessing that the code should have been written to resolve thedst
argument instead:The doc comment is written to reflect the incorrect behavior.
How To Reproduce
The
os.symlink
call above will succeed, but createslink.txt
in the wrong location, leading toos.readlink
generating aFileNotFoundError
.Your environment
Please run the following in the environment where the problem happened and
paste the output.
The text was updated successfully, but these errors were encountered: