Skip to content

Default implementation of FS.islink is probably wrong #425

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

Open
althonos opened this issue Sep 19, 2020 · 0 comments · May be fixed by #431
Open

Default implementation of FS.islink is probably wrong #425

althonos opened this issue Sep 19, 2020 · 0 comments · May be fixed by #431
Labels
Milestone

Comments

@althonos
Copy link
Member

The current implementation of fs.base.FS.islink is the following:

    def islink(self, path):
        self.getinfo(path)
        return False

Because of this, and contrary to FS.isdir and FS.isfile, a filesystem implementation simply relying on the type attribute in the details namespace of getinfo to convey a file type will not work. This probably affects TarFS in this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant