]> git.pld-linux.org Git - packages/calamaris.git/commitdiff
- die early if output can't be written
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 7 Feb 2007 16:56:44 +0000 (16:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    calamaris-croniface -> 1.10

calamaris-croniface

index 17f5b183734d255479d591380317be1acee97b18..666af31401e98873fcacad10a3e3dce958640211 100644 (file)
@@ -73,6 +73,11 @@ make_stats() {
                else
                        ARG="$ARG_PLAIN"
                fi
+               local dir=$(dirname "$3")
+               if [ ! -d "$dir" ]; then
+                       echo >&2 "$3 can not be saved as it's parent dir $dir does not exist!"
+                       exit 1
+               fi
                call_calamaris "$1" "$ARG" > $3
                [ -n "$SAVE_OWNER" ] || chown $SAVE_OWNER $3
                [ -n "$SAVE_PERM" ] || chmod $SAVE_PERM $3
This page took 0.117951 seconds and 4 git commands to generate.