]> granicus.if.org Git - nethack/commitdiff
dos port chdir fix
authornethack.allison <nethack.allison>
Mon, 18 Sep 2006 23:18:54 +0000 (23:18 +0000)
committernethack.allison <nethack.allison>
Mon, 18 Sep 2006 23:18:54 +0000 (23:18 +0000)
I don't know if this was introduced post 3.4.3 or not, but the
DOS port was doing a chdir at the start, but not doing one
at the finish of the game, so you ended up in the same
directory as the NetHack.exe executable post-game.

It was doing the chdir even if NOCWD_ASSUMPTIONS was
defined.

sys/share/pcmain.c

index 12804c45d0bc1a107d4a906423314b2d6ce6e775..c5715f1c3441e127d26c2d2b7aa682db304efa2f 100644 (file)
@@ -167,7 +167,7 @@ char *argv[];
                        fqn_prefix[prefcnt] = fqn_prefix[0];
                }
 #endif
-#ifdef CHDIR
+#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS)
                chdirx (dir, 1);
 #endif
        }