From 5865744a683f88fe655ee64561dea8aac2085be3 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Tue, 11 Dec 2012 14:38:00 -0800 Subject: [PATCH] Don't use custom dir if not passed in conf --- nzbget-postprocessing-files/0.8.0/postprocess.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nzbget-postprocessing-files/0.8.0/postprocess.sh b/nzbget-postprocessing-files/0.8.0/postprocess.sh index e03a23f8..845863d4 100644 --- a/nzbget-postprocessing-files/0.8.0/postprocess.sh +++ b/nzbget-postprocessing-files/0.8.0/postprocess.sh @@ -342,7 +342,8 @@ fi ############################ # Move categories to /share/yourdirectory and remove download destination directory -if [ "$NZBPP_CATEGORY" = "$SickBeardCategory" ]; then +# Test for category and ensure the passed directory exists as a directory. +if [ "$NZBPP_CATEGORY" = "$SickBeardCategory" -a -d "$TvDownloadDir" ]; then echo "[INFO] Post-Process: Moving TV shows to $TvDownloadDir" cp -R "$NZBPP_DIRECTORY" "$TvDownloadDir" >/dev/null 2>&1 if [ "$?" -ne 0 ]; then @@ -355,8 +356,8 @@ if [ "$NZBPP_CATEGORY" = "$SickBeardCategory" ]; then NZBPP_DIRECTORY="$TvDownloadDir" fi fi - -if [ "$NZBPP_CATEGORY" = "$CouchPotatoCategory" ]; then +# Test for category and ensure the passed directory exists as a directory. +if [ "$NZBPP_CATEGORY" = "$CouchPotatoCategory" -a -d "$MoviesDownloadDir' ]; then echo "[INFO] Post-Process: Moving Movies to $MoviesDownloadDir" cp -R "$NZBPP_DIRECTORY" "$MoviesDownloadDir" >/dev/null 2>&1 if [ "$?" -ne 0 ]; then