mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
fix atomic file replace on windows
This commit is contained in:
parent
2e0ee5f5b2
commit
79b098c409
3 changed files with 3 additions and 3 deletions
|
|
@ -79,7 +79,7 @@ class Store:
|
|||
self._create_config_table(db)
|
||||
|
||||
# Atomic file move
|
||||
os.rename(tmpfile, self.db_path)
|
||||
os.replace(tmpfile, self.db_path)
|
||||
|
||||
@contextlib.contextmanager
|
||||
def exclusive_lock(self) -> Generator[None, None, None]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue