summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-09-24 15:33:59 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-09-24 15:33:59 (GMT)
commit186de605d56915b05f2d76a92b7c4c41bb4aab00 (patch)
treebb6c96e6fd181d7ecb8f4955a54a00ef28e0735d
parentf051f82ecdfc479a554796706408dd9744ff7a78 (diff)
remove file even if there is early init error
-rwxr-xr-xcontrib/newfile.sh2
-rw-r--r--src/klokdisplay.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/contrib/newfile.sh b/contrib/newfile.sh
index 798e25d..d0e82e5 100755
--- a/contrib/newfile.sh
+++ b/contrib/newfile.sh
@@ -11,4 +11,4 @@ fi
export DISPLAY=':0.0'
export XAUTHORITY='/home/equinox/.Xauthority'
-exec klokdisplay "$DIR/$FILENAME"
+exec /home/equinox/spreadspace/klok/klokdisplay/src/klokdisplay "$DIR/$FILENAME"
diff --git a/src/klokdisplay.c b/src/klokdisplay.c
index 231352e..ec2c4bd 100644
--- a/src/klokdisplay.c
+++ b/src/klokdisplay.c
@@ -43,6 +43,8 @@ int main(int argc, char **argv)
status = MagickDisplayImage(wand, NULL);
}
wand = DestroyMagickWand(wand);
+ } else {
+ unlink(argv[1]);
}
MagickCoreTerminus();