mirror of https://github.com/trapexit/mergerfs.git
Browse Source
Merge pull request #619 from trapexit/hiddenfiles
Merge pull request #619 from trapexit/hiddenfiles
fix renaming over open unlinked filepull/620/head 2.26.2
trapexit
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 20 deletions
@ -0,0 +1,14 @@ |
|||
#!/usr/bin/env python3 |
|||
|
|||
import os |
|||
import sys |
|||
import tempfile |
|||
|
|||
(srcfd,src) = tempfile.mkstemp(dir=sys.argv[1]) |
|||
(tgtfd,tgt) = tempfile.mkstemp(dir=sys.argv[1]) |
|||
|
|||
os.unlink(tgt) |
|||
os.rename(src,tgt) |
|||
|
|||
os.close(srcfd) |
|||
os.close(tgtfd) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue