mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 22:03:13 -07:00
reprocess when directory already deleted.
Need to be careful not to delete or move everything in this case.
This commit is contained in:
parent
bfb0ff4eea
commit
44c573d982
1 changed files with 4 additions and 3 deletions
|
@ -191,12 +191,13 @@ 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
|
||||
cd $NZBPP_DIRECTORY
|
||||
if [ "$Delete_Failed" = "yes" -a "$NZBPP_DIRECTORY" != "$ConfigDir" ]; then
|
||||
if [ "$Delete_Failed" = "yes" -a "$NZBPP_DIRECTORY" != "$ConfigDir" -a -d "$NZBPP_DIRECTORY" ]; then
|
||||
cd $NZBPP_DIRECTORY
|
||||
rm * >/dev/null 2>&1
|
||||
cd ..
|
||||
rmdir $NZBPP_DIRECTORY
|
||||
elif [ "$NZBPP_DIRECTORY" != "$ConfigDir" -a "$Failed_Directory" != "" ]; then
|
||||
elif [ "$NZBPP_DIRECTORY" != "$ConfigDir" -a "$Failed_Directory" != "" -a -d "$NZBPP_DIRECTORY" ]; then
|
||||
cd $NZBPP_DIRECTORY
|
||||
mkdir $Failed_Directory
|
||||
mkdir $Failed_Directory/$NZBPP_CATEGORY
|
||||
mv * $Failed_Directory/$NZBPP_CATEGORY >/dev/null 2>&1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue