1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 17:27:25 +00:00

Merge pull request #2945 from YoshieraHuang/max-file-size

Fix nil check in rejectBySize
This commit is contained in:
rawtaz 2020-09-21 14:18:45 +02:00 committed by GitHub
commit 10e3340863
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,7 @@
Bugfix: Make --exclude-larger-than handle disappearing files
There was a small bug in the backup command's --exclude-larger-than
option where files that disappeared between scanning and actually
backing them up to the repository caused a panic. This is now fixed.
https://github.com/restic/restic/issues/2942

View file

@ -301,6 +301,10 @@ func rejectBySize(maxSizeStr string) (RejectFunc, error) {
}
return func(item string, fi os.FileInfo) bool {
if fi == nil {
return false
}
// directory will be ignored
if fi.IsDir() {
return false