mirror of
https://github.com/deajan/obackup.git
synced 2025-01-12 15:13:53 +01:00
Fixed bogus backup when no recursive directories set
This commit is contained in:
parent
eead765d69
commit
bc396270df
@ -7,7 +7,7 @@ PROGRAM="obackup"
|
|||||||
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=2.1-dev
|
PROGRAM_VERSION=2.1-dev
|
||||||
PROGRAM_BUILD=2017010205
|
PROGRAM_BUILD=2017010206
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
include #### OFUNCTIONS FULL SUBSET ####
|
include #### OFUNCTIONS FULL SUBSET ####
|
||||||
@ -455,8 +455,8 @@ function ListRecursiveBackupDirectories {
|
|||||||
local excluded
|
local excluded
|
||||||
local fileArray
|
local fileArray
|
||||||
|
|
||||||
if [ "$RECURSIVE_DIRECTORY_LIST" == "" ]; then
|
if [ "$RECURSIVE_DIRECTORY_LIST" != "" ]; then
|
||||||
fi
|
|
||||||
# Return values from subfunctions can be 0 (no error), 1 (only errors) or 2 (some errors). Do process output except on 1 return code
|
# Return values from subfunctions can be 0 (no error), 1 (only errors) or 2 (some errors). Do process output except on 1 return code
|
||||||
Logger "Listing directories to backup." "NOTICE"
|
Logger "Listing directories to backup." "NOTICE"
|
||||||
if [ "$BACKUP_TYPE" == "local" ] || [ "$BACKUP_TYPE" == "push" ]; then
|
if [ "$BACKUP_TYPE" == "local" ] || [ "$BACKUP_TYPE" == "push" ]; then
|
||||||
@ -502,6 +502,9 @@ function ListRecursiveBackupDirectories {
|
|||||||
fi
|
fi
|
||||||
done < "$output_file"
|
done < "$output_file"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$DIRECTORY_LIST" != "" ]; then
|
||||||
|
|
||||||
IFS=$PATH_SEPARATOR_CHAR read -r -a fileArray <<< "$DIRECTORY_LIST"
|
IFS=$PATH_SEPARATOR_CHAR read -r -a fileArray <<< "$DIRECTORY_LIST"
|
||||||
for directory in "${fileArray[@]}"; do
|
for directory in "${fileArray[@]}"; do
|
||||||
@ -519,6 +522,7 @@ function ListRecursiveBackupDirectories {
|
|||||||
FILE_BACKUP_TASKS="$FILE_BACKUP_TASKS$PATH_SEPARATOR_CHAR$directory"
|
FILE_BACKUP_TASKS="$FILE_BACKUP_TASKS$PATH_SEPARATOR_CHAR$directory"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function _GetDirectoriesSizeLocal {
|
function _GetDirectoriesSizeLocal {
|
||||||
|
Loading…
Reference in New Issue
Block a user