mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 20:50:22 +03:00
crawler: Missing folder heal check per set (#10876)
This commit is contained in:
@@ -43,6 +43,9 @@ type WalkDirOptions struct {
|
||||
// Do a full recursive scan.
|
||||
Recursive bool
|
||||
|
||||
// ReportNotFound will return errFileNotFound if all disks reports the BaseDir cannot be found.
|
||||
ReportNotFound bool
|
||||
|
||||
// FilterPrefix will only return results with given prefix within folder.
|
||||
// Should never contain a slash.
|
||||
FilterPrefix string
|
||||
@@ -98,6 +101,9 @@ func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writ
|
||||
if err != errVolumeNotFound && err != errFileNotFound {
|
||||
logger.LogIf(ctx, err)
|
||||
}
|
||||
if opts.ReportNotFound && err == errFileNotFound && current == opts.BaseDir {
|
||||
return errFileNotFound
|
||||
}
|
||||
// Forward some errors?
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user