Skip to content

Commit 6c6a82a

Browse files
fschlattlhoestq
andauthored
remove filecheck to enable symlinks (#7133)
* remove filecheck to enable symlinks * Update src/datasets/data_files.py * use relpath to resolve symlink --------- Co-authored-by: Quentin Lhoest <[email protected]>
1 parent 7298e5a commit 6c6a82a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/datasets/data_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def resolve_pattern(
386386
matched_paths = [
387387
filepath if filepath.startswith(protocol_prefix) else protocol_prefix + filepath
388388
for filepath, info in fs.glob(pattern, detail=True, **glob_kwargs).items()
389-
if info["type"] == "file"
389+
if (info["type"] == "file" or (info.get("islink") and os.path.isfile(os.path.realpath(filepath))))
390390
and (xbasename(filepath) not in files_to_ignore)
391391
and not _is_inside_unrequested_special_dir(filepath, fs_pattern)
392392
and not _is_unrequested_hidden_file_or_is_inside_unrequested_hidden_dir(filepath, fs_pattern)

0 commit comments

Comments
 (0)