Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sol1-backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sol1-backupninja
sol1-backupninja
Commits
c37a6094
Commit
c37a6094
authored
7 years ago
by
Matthew Smith
Browse files
Options
Downloads
Patches
Plain Diff
Update handlers/rdiff.in
parent
1a887b83
Branches
abort_empty_source_backup
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
handlers/rdiff.in
+3
-3
3 additions, 3 deletions
handlers/rdiff.in
with
3 additions
and
3 deletions
handlers/rdiff.in
+
3
−
3
View file @
c37a6094
...
...
@@ -399,12 +399,12 @@ done
# Assume all includes are empty
areincludesempty
=
true
for
i
in
$include
;
do
[
"
$i
"
!=
"/"
]
||
fatal
"Sorry, you cannot use 'include = /'"
[
"
$i
"
!=
"/"
]
||
fatal
"Sorry, you cannot use 'include = /'"
# Escape spaces (backslashes should not have been in first place...)
str
=
"
${
i
// /\\\
}
"
# Set not empty if any have files or directories
ls
"
${
str
}
/
*
"
>
2&>1 /dev/null
;
[
$?
-
e
q
0
]
&&
areincludesempty
=
false
execstr
=
"
${
execstr
}
--include '
$str
' "
find
"
${
str
}
/"
-mindepth
1
-print
-quit
|
grep
-q
.
&&
areincludesempty
=
false
execstr
=
"
${
execstr
}
--include '
$str
' "
done
# Don't backup a source that includes no files or folders
[
$areincludesempty
=
true
]
&&
fatal
"Source includes contain no files or folders, aborting backup"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment