mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 21:05:10 +00:00
Fix nil check in rejectBySize
This commit is contained in:
parent
1cfb01a8a6
commit
3cf29a777d
7
changelog/unreleased/issue-2942
Normal file
7
changelog/unreleased/issue-2942
Normal 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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user