Check if chdir-command failed.

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@537 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Pasi Kallinen 2010-05-01 15:01:03 +00:00
parent 113fc564ef
commit a0a9bb8cdc
1 changed files with 6 additions and 1 deletions

View File

@ -215,7 +215,12 @@ dgl_exec_cmdqueue(struct dg_cmdpart *queue, int game, struct dg_user *me)
if (p1 && (access(p1, F_OK) != 0)) unlink(p1);
break;
case DGLCMD_CHDIR:
if (p1) chdir(p1);
if (p1) {
if (chdir(p1) == -1) {
debug_write("chdir-command failed");
graceful_exit(123);
}
}
break;
case DGLCMD_IF_NX_CP:
if (p1 && p2) {