]> skyeroc.xyz Git - dgamelaunch/commitdiff
Fix the "unlink" command so it actually works.
authorPasi Kallinen <paxed@alt.org>
Wed, 31 Aug 2011 14:42:37 +0000 (14:42 +0000)
committerPasi Kallinen <paxed@alt.org>
Wed, 31 Aug 2011 14:42:37 +0000 (14:42 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@589 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgl-common.c

index c91de48dabe7318c3466be10e8dd417bf911d16e..dd6221d26fc32064f5498fbcd5e963c3512f6beb 100644 (file)
@@ -219,7 +219,7 @@ dgl_exec_cmdqueue(struct dg_cmdpart *queue, int game, struct dg_user *me)
            if (p1 && (access(p1, F_OK) != 0)) mkdir(p1, 0755);
            break;
        case DGLCMD_UNLINK:
-           if (p1 && (access(p1, F_OK) != 0)) unlink(p1);
+           if (p1 && (access(p1, F_OK) == 0)) unlink(p1);
            break;
        case DGLCMD_CHDIR:
            if (p1) {