mergerfs/tests/TEST_use_fchmod_after_unlink
2019-05-04 17:16:52 -04:00

16 lines
189 B
Python
Executable File

#!/usr/bin/env python3
import os
import sys
import tempfile
(fd,filepath) = tempfile.mkstemp(dir=sys.argv[1])
os.fchmod(fd,0o777)
os.unlink(filepath)
os.fchmod(fd,0o777)
os.close(fd)