]> skyeroc.xyz Git - dgamelaunch/commitdiff
Try to use the dglroot dir as home if we are doing the chroot
authorTangles <andyrthomson@gmail.com>
Sat, 22 Feb 2020 01:03:00 +0000 (12:03 +1100)
committerTangles <andyrthomson@gmail.com>
Sat, 22 Feb 2020 01:03:00 +0000 (12:03 +1100)
dgamelaunch.c

index d8d2b18ab44ade9506d38d79c212d0042ffd4606..80178f6190238bcd9d1e8a1d9e61f18c40abad41 100644 (file)
@@ -3123,7 +3123,11 @@ main (int argc, char** argv)
          graceful_exit (2);
        }
 
-      if (chdir ("/"))
+      if (chdir (globalconfig.dglroot))
+        {
+          perror("warning: cannot chdir to dglroot directory, using / instead");
+        }
+      else if (chdir ("/"))
        {
          perror ("cannot chdir to root directory");
          graceful_exit (3);