mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-10-22 15:32:34 +00:00
FS: Skip temporary files in Enumerate{Blobs,Manifests}.
This commit is contained in:
@@ -202,6 +202,8 @@ func (fs *FSBackend) EnumerateBlobs(ctx context.Context) iter.Seq2[BlobMetadata,
|
||||
return nil
|
||||
} else if info, err := entry.Info(); err != nil {
|
||||
// report error
|
||||
} else if strings.HasPrefix(path, ".tmp") {
|
||||
// temporary
|
||||
} else {
|
||||
// report blob
|
||||
metadata.Name = joinBlobName(strings.Split(path, "/"))
|
||||
@@ -423,6 +425,8 @@ func (fs *FSBackend) EnumerateManifests(ctx context.Context) iter.Seq2[*Manifest
|
||||
} else if entry.IsDir() {
|
||||
// skip directory
|
||||
return nil
|
||||
} else if strings.HasPrefix(path, ".tmp") {
|
||||
// temporary
|
||||
} else if project == "" || strings.HasPrefix(project, ".") && project != ".index" {
|
||||
// skip internal
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user