diff --git a/nzbget-postprocessing-files/9.0/bin/nzbget-postprocess.sh b/nzbget-postprocessing-files/9.0/bin/nzbget-postprocess.sh index eb6c2b9d..7df62cfc 100644 --- a/nzbget-postprocessing-files/9.0/bin/nzbget-postprocess.sh +++ b/nzbget-postprocessing-files/9.0/bin/nzbget-postprocess.sh @@ -447,14 +447,11 @@ fi # 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" + mv "$NZBPP_DIRECTORY" "$TvDownloadDir" if [ "$?" -ne 0 ]; then echo "[ERROR] Post-Process: Moving to $TvDownloadDir" exit $POSTPROCESS_ERROR else - rm -fr * - cd .. - rmdir "$NZBPP_DIRECTORY" NZBPP_DIRECTORY="$TvDownloadDir" cd "$NZBPP_DIRECTORY" fi @@ -462,14 +459,11 @@ fi # 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" + mv "$NZBPP_DIRECTORY" "$MoviesDownloadDir" if [ "$?" -ne 0 ]; then echo "[ERROR] Post-Process: Moving to $MoviesDownloadDir" exit $POSTPROCESS_ERROR else - rm -fr * - cd .. - rmdir "$NZBPP_DIRECTORY" NZBPP_DIRECTORY="$MoviesDownloadDir" cd "$NZBPP_DIRECTORY" fi @@ -477,14 +471,11 @@ fi # Test for category and ensure the passed directory exists as a directory. if [ "$NZBPP_CATEGORY" = "$CustomCategory" -a -d "$CustomDownloadDir" ]; then echo "[INFO] Post-Process: Moving $CustomCategory to $CustomDownloadDir" - cp -R "$NZBPP_DIRECTORY" "$CustomDownloadDir" + mv "$NZBPP_DIRECTORY" "$CustomDownloadDir" if [ "$?" -ne 0 ]; then echo "[ERROR] Post-Process: Moving to $CustomDownloadDir" exit $POSTPROCESS_ERROR else - rm -fr * - cd .. - rmdir "$NZBPP_DIRECTORY" NZBPP_DIRECTORY="$CustomDownloadDir" cd "$NZBPP_DIRECTORY" fi