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

Implement proper symlink support in ReadTarFS #426

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

althonos
Copy link
Member

@althonos althonos commented Sep 19, 2020

Type of changes

  • Bug fix
  • New feature

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

The current version of ReadTarFS does not support symlinks properly where Tar files do. This PR changes the following:

OSFS like behaviour for Info

  • Info.is_dir is True for symlinks that map to existing directories.
  • ReadTarFS.isdir(path) returns True if path is a symlink that maps to an existing directory.
  • ReadTarFS.isfile(path) returns True if the path is a symlink that maps to an existing file.
  • ReadTarFs.islink(path) return True if the path is a symlink (that can also be dangling).

Transparent handling of symlinks

  • ReadTarFS.openbin(path) also works if path is a symlink that maps to an existing file.
  • ReadTarFS.listdir(path) also works if path is a symlink that maps to an existing file.

Closes #409 and partially addresses #425.

@althonos althonos added this to the v2.4.12 milestone Sep 19, 2020
@althonos althonos modified the milestones: v2.4.12, v2.5.0 Sep 30, 2020
@althonos
Copy link
Member Author

Moving this to milestone v2.5.0 because this is a fundamental change.

@althonos althonos linked an issue Nov 16, 2021 that may be closed by this pull request
@althonos althonos removed a link to an issue Nov 16, 2021
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.

Copying metadata between FS objects
1 participant