From d772db4baa77b1f11599e2e4aa8460cb80da8796 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Sat, 23 Mar 2013 13:13:18 -0700 Subject: [PATCH] don't delete/ move option #98 --- .../current-stable/nzbget-postprocess.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nzbget-postprocessing-files/current-stable/nzbget-postprocess.sh b/nzbget-postprocessing-files/current-stable/nzbget-postprocess.sh index b4cf5355..fd9338b9 100644 --- a/nzbget-postprocessing-files/current-stable/nzbget-postprocess.sh +++ b/nzbget-postprocessing-files/current-stable/nzbget-postprocess.sh @@ -191,11 +191,12 @@ do_exit() { if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: Executing function 'do_exit' with argument $1" | tee -a $tmplog; fi nzbStatus=0 if [ "$1" -ne "$POSTPROCESS_SUCCESS" ]; then - if [ "$Delete_Failed" = "yes" ]; then + cd $NZBPP_DIRECTORY + if [ "$Delete_Failed" = "yes" -a "$NZBPP_DIRECTORY" != "$ConfigDir" ]; then rm * >/dev/null 2>&1 cd .. rmdir $NZBPP_DIRECTORY - else + elif [ "$NZBPP_DIRECTORY" != "$ConfigDir" -a "$Failed_Directory" != "" ] mkdir $Failed_Directory mv * $Failed_Directory >/dev/null 2>&1 cd ..