mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-29 20:13:57 +08:00
15 lines
226 B
Plaintext
15 lines
226 B
Plaintext
|
#!/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)
|