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

20 lines
353 B
Python
Executable File

#!/usr/bin/env python3
import os
import sys
import tempfile
(fd,filepath) = tempfile.mkstemp(dir=sys.argv[1])
ino = os.fstat(fd).st_ino
os.unlink(filepath)
for entry in os.scandir(sys.argv[1]):
if entry.inode() == ino:
print("found .fuse_hidden file {}".format(entry.name),end='')
os.close(fd)
sys.exit(1)
os.close(fd)