Commit 931af67a authored by Nigel Kukard's avatar Nigel Kukard
Browse files

--exclude-data no longer depends on --exclude-system

Before this change, for --exclude-data to work one must specify
--exclude-system too. This is no longer the case and both options
now work independently.
parent dee3e1aa
......@@ -453,19 +453,19 @@ sub backup
return ();
}
}
# Check if we excluding data dirs
if (defined($config{'exclude-data'})) {
# Loop with data dirs
foreach my $excl (@defaultDataExcl,@{$config{'data-dir'}}) {
# Sanitize path
my $testPath = File::Spec->rel2abs("$sysdir/$excl");
# Check...
if ("/$path" eq $testPath) {
printLog(LOG_INFO,"S: Path '[$source]/($path)' is a data directory, ignoring files\n");
$doBackup{$path} |= ST_DIR_SYS;
return ();
}
}
}
}
# Check if we excluding data dirs
if (defined($config{'exclude-data'})) {
# Loop with data dirs
foreach my $excl (@defaultDataExcl,@{$config{'data-dir'}}) {
# Sanitize path
my $testPath = File::Spec->rel2abs("$sysdir/$excl");
# Check...
if ("/$path" eq $testPath) {
printLog(LOG_INFO,"S: Path '[$source]/($path)' is a data directory, ignoring files\n");
$doBackup{$path} |= ST_DIR_SYS;
return ();
}
}
}
......@@ -1026,10 +1026,10 @@ sub backup
if ($config{'exclude-system'}) {
printLog(LOG_NOTICE,"Exclude System Base: ".join(", ",@{$config{'system-base'}})."\n");
printLog(LOG_NOTICE,"Exclude System Dirs: ".join(", ",@defaultSystemExcl,@{$config{'system-dir'}})."\n");
# If we excluding data too...
if ($config{'exclude-data'}) {
printLog(LOG_NOTICE,"Exclude Data Dirs: ".join(", ",@defaultDataExcl,@{$config{'data-dir'}})."\n");
}
}
# If we excluding data too...
if ($config{'exclude-data'}) {
printLog(LOG_NOTICE,"Exclude Data Dirs: ".join(", ",@defaultDataExcl,@{$config{'data-dir'}})."\n");
}
printLog(LOG_NOTICE,"Exclude Paths: ".join(", ",@{$config{'exclude-path'}})."\n");
printLog(LOG_NOTICE,"Exclude Files: ".join(", ",@{$config{'exclude-file'}})."\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment