]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
init: Add check for work dir before mkdir
authorErfan Abdi <erfangplus@gmail.com>
Mon, 6 Sep 2021 10:29:24 +0000 (14:59 +0430)
committerErfan Abdi <erfangplus@gmail.com>
Mon, 6 Sep 2021 12:19:20 +0000 (16:49 +0430)
tools/__init__.py

index 13a6110b15ec0e266957376a4a5977d22bfb8271..cdb5cdd017192a4c96186e437a8cbb732029ff44 100644 (file)
@@ -36,7 +36,8 @@ def main():
                 print('ERROR: WayDroid is not initialized, run "waydroid init"')
                 return 0
             elif os.geteuid() == 0 and args.action == "init":
-                os.mkdir(args.work)
+                if not os.path.exists(args.work):
+                    os.mkdir(args.work)
             else:
                 args.log = "/tmp/tools.log"