Skip to content

Conversation

@AsherJingkongChen
Copy link

Fixes #1827

Creates temp file in the same directory as the target to prevent EXDEV errors
when temp and target are on different filesystems (e.g., checkpoints to NFS).

Changes

  • mkstemp uses dir=os.path.dirname(self.path) with filename prefix
  • Removed PermissionError workaround since EXDEV won't occur
  • chmod catches PermissionError for filesystems without permission support
  • Test verifies temp file location directly

Context

Similar approach was in #1829 initially. As noted there, this only affects local.py.

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.

Invalid cross-device link

1 participant