From 542f2c9ba4fd9754db23a102f0c16c680b72e272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Thu, 27 Feb 2020 09:46:50 +0100 Subject: [PATCH] create Mountpoint, if not existing --- workdirfs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workdirfs.py b/workdirfs.py index 042d9ef..a644647 100755 --- a/workdirfs.py +++ b/workdirfs.py @@ -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__':