del metafile in whatnow2 only if send don't fail
authorPhilipp Takacs <philipp@bureaucracy.de>
Sun, 14 Aug 2016 20:36:55 +0000 (22:36 +0200)
committerPhilipp Takacs <philipp@bureaucracy.de>
Sun, 14 Aug 2016 20:36:55 +0000 (22:36 +0200)
If send fails, you want to keep the metafile. Without this dist wold
only work, if send works on the first time. Also some metainfo don't
get lost.

uip/whatnow2.sh

index 00a40e1..2e3cf12 100755 (executable)
@@ -156,8 +156,9 @@ send()
        export mhfolder=`anno -list -component 'mhfolder' $mhmetafile`
        export mhmessages=`anno -list -component 'mhmessages' $mhmetafile`
        export mhannotate=`anno -list -component 'mhannotate' $mhmetafile`
        export mhfolder=`anno -list -component 'mhfolder' $mhmetafile`
        export mhmessages=`anno -list -component 'mhmessages' $mhmetafile`
        export mhannotate=`anno -list -component 'mhannotate' $mhmetafile`
+       exec send "$@" $mhdraft || exit $?
        rm -f $mhmetafile
        rm -f $mhmetafile
-       exec send "$@" $mhdraft
+       exit 0
 }
 
 delete()
 }
 
 delete()