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

Warn on ignored symlinks to directories #647

Merged
merged 1 commit into from
May 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Warn on ignored symlinks to directories
  • Loading branch information
jwodder committed May 24, 2021
commit 6feb792e9b90d367fa7d47f559a69ae7af0d364a
7 changes: 6 additions & 1 deletion dandi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,12 @@ def good_file(path):
paths = (op.join(dirpath, name) for name in names)
for path in filter(re.compile(regex).search, paths):
if not exclude_path(path):
yield path
if op.islink(path) and op.isdir(path):
lgr.warning(
"%s: Ignoring unsupported symbolic link to directory", path
)
else:
yield path


_cp_supports_reflink = None
Expand Down