]> arthur.barton.de Git - bup.git/blobdiff - cmd/fuse-cmd.py
index-cmd: prevent a division by zero while computing paths_per_second.
[bup.git] / cmd / fuse-cmd.py
index 64880975d861eb71be80ce34e15a6ea8b853a718..1621f1e527cadc95d5dbbb09cfa24fd59d82079a 100755 (executable)
@@ -1,7 +1,12 @@
 #!/usr/bin/env python
-import sys, os, stat, errno, fuse, re, time, tempfile
+import sys, os, errno
 from bup import options, git, vfs
 from bup.helpers import *
+try:
+    import fuse
+except ImportError:
+    log('error: cannot find the python "fuse" module; please install it\n')
+    sys.exit(1)
 
 
 class Stat(fuse.Stat):
@@ -108,8 +113,9 @@ bup fuse [-d] [-f] <mountpoint>
 --
 d,debug   increase debug level
 f,foreground  run in foreground
+o,allow-other allow other users to access the filesystem
 """
-o = options.Options('bup fuse', optspec)
+o = options.Options(optspec)
 (opt, flags, extra) = o.parse(sys.argv[1:])
 
 if len(extra) != 1:
@@ -125,6 +131,7 @@ if opt.foreground:
     f.fuse_args.setmod('foreground')
 print f.multithreaded
 f.multithreaded = False
-f.fuse_args.add('allow_other')
+if opt.allow_other:
+    f.fuse_args.add('allow_other')
 
 f.main()