]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
fuse: impl_b: Support --basedir on commandline.
authornejucomo <nejucomo@gmail.com>
Sat, 7 Jun 2008 06:16:38 +0000 (23:16 -0700)
committernejucomo <nejucomo@gmail.com>
Sat, 7 Jun 2008 06:16:38 +0000 (23:16 -0700)
contrib/fuse/impl_b/pyfuse/tahoe.py

index 06712f092979933b8865f6b1557faf813eadd3d6..835876fef11e0f00c0693ebd8eae75a798fcb10c 100644 (file)
@@ -101,6 +101,11 @@ def main(mountpoint, basedir):
     handler.loop_forever()
 
 if __name__ == '__main__':
-    [mountpoint] = sys.argv[1:]
     basedir = os.path.expanduser(TahoeConfigDir)
+    for i, arg in enumerate(sys.argv):
+        if arg == '--basedir':
+            basedir = sys.argv[i+1]
+            sys.argv[i:i+2] = []
+
+    [mountpoint] = sys.argv[1:]
     main(mountpoint, basedir)