create Mountpoint, if not existing
This commit is contained in:
parent
ec91cf1dab
commit
542f2c9ba4
1 changed files with 4 additions and 1 deletions
|
@ -22,7 +22,7 @@ except:
|
|||
try:
|
||||
from fusepy import FUSE, FuseOSError, Operations
|
||||
except:
|
||||
print("please install fusepy")
|
||||
print("please install fusepy for python3")
|
||||
raise errno.ModuleNotFoundError
|
||||
|
||||
|
||||
|
@ -303,6 +303,9 @@ class WorkdirFS(Operations):
|
|||
def main(args):
|
||||
#FUSE(WorkdirFS(root), mountpoint, nothreads=True, foreground=True)
|
||||
# start FUSE filesystem
|
||||
mountpoint = os.path.join(os.environ['HOME'], args.mountpoint)
|
||||
if not (os.path.isdir(mountpoint) || os.path.exists(mountpoint)):
|
||||
os.mkdir(mountpoint, "0744")
|
||||
FUSE(WorkdirFS(args), os.path.join(os.environ['HOME'], args.mountpoint), nothreads=True, foreground=True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue