Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions dgl-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ dgl_exec_cmdqueue(struct dg_cmdpart *queue, int game, struct dg_user *me)
switch (tmp->cmd) {
default: break;
case DGLCMD_RAWPRINT:
if (p1) fprintf(stdout, "%s", p1);
fprintf(stdout, "%s", p1);
break;
case DGLCMD_MKDIR:
if (p1 && (access(p1, F_OK) != 0)) mkdir(p1, 0755);
Expand All @@ -243,12 +243,10 @@ 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) {
if (chdir(p1) == -1) {
debug_write("chdir-command failed");
graceful_exit(123);
}
}
if (chdir(p1) == -1) {
debug_write("chdir-command failed");
graceful_exit(123);
}
break;
case DGLCMD_IF_NX_CP:
if (p1 && p2) {
Expand Down Expand Up @@ -334,8 +332,7 @@ dgl_exec_cmdqueue(struct dg_cmdpart *queue, int game, struct dg_user *me)
graceful_exit(0);
/* break; */
case DGLCMD_SUBMENU:
if (p1)
runmenuloop(dgl_find_menu(p1));
runmenuloop(dgl_find_menu(p1));
break;
case DGLCMD_RETURN:
return_from_submenu = 1;
Expand Down