Skip to content

Honor create mode when uploading local files - #2276

Open
xiehuanyi wants to merge 1 commit into
fsspec:masterfrom
xiehuanyi:fix-local-put-file-create
Open

xiehuanyi wants to merge 1 commit into
fsspec:masterfrom
xiehuanyi:fix-local-put-file-create

Conversation

@xiehuanyi

Copy link
Copy Markdown

LocalFileSystem.put_file(..., mode="create") silently ignores the mode and overwrites an existing destination. Honor the same existence check as the base implementation and raise FileExistsError before copying. Tests cover an existing and a new destination with both local paths and file URIs.

Validation: 2 failures and2passes forcreate-mode cases before the change. Relevant local, memory, mapping and utility/cache tests pass afterwards (654passed,29skipped,1xfailed); all pre-commit hooks pass. Optional dependency tests are skipped.

Copilot AI balanced review requested due to automatic review settings October 11, 2026 21:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants