fsspec / fsspec/filesystem_spec

copy directory contains symbolic to subdir to directory twice bigger

Open
#1,843 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.4k
Forks
490
Avg merge
2d 3h
Merged PRs (30d)
38

Description

src dir:

data/2025-05-16
├── sparse_embeddings -> model/sparse_embeddings
└── model/sparse_embeddings/

when use local fs to copy, the sparse_embeddings symbolic link will copy model/sparse_embeddings data duplicated. As a result, the data/2025-05-16 directory will be twice bigger than origin.

from fsspec.implementations.local import LocalFileSystem

fs = LocalFileSystem()
fs.copy("data/2025-05-16/", "models/2025-05-16/", recursive=True)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the LocalFileSystem.copy entry point and reproduce the recursive copy with the shown directory layout, including the symbolic link to model/sparse_embeddings. Trace how recursive copying handles symbolic links; done means the destination does not duplicate the symlink target data and the reproduction no longer makes the copied directory twice as large.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.