4
0
Эх сурвалжийг харах

prevent default warn message when max-archive-depth not set (#1881)

Zachary Rice 8 сар өмнө
parent
commit
c5683ca6a3
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      sources/file.go

+ 1 - 1
sources/file.go

@@ -55,7 +55,7 @@ func (s *File) Fragments(ctx context.Context, yield FragmentsFunc) error {
 	// and fall back on treating it like a normal file and let fileFragments
 	// and fall back on treating it like a normal file and let fileFragments
 	// decide what to do with it.
 	// decide what to do with it.
 	if err == nil && format != nil {
 	if err == nil && format != nil {
-		if s.archiveDepth+1 > s.MaxArchiveDepth {
+		if (s.archiveDepth+1 > s.MaxArchiveDepth) && s.MaxArchiveDepth != 0 {
 			logging.Warn().Str(
 			logging.Warn().Str(
 				"path", s.FullPath(),
 				"path", s.FullPath(),
 			).Int(
 			).Int(