Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Sumit Solanki <sumit.solanki@ibm.com>
pull/32113/head
Sumit Solanki 3 days ago committed by GitHub
parent 6620fec5d1
commit 53d5f13f46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -64,8 +64,8 @@ func (c *DiskCache) Get(key [sha256.Size]byte, cacheType string) (string, error)
if fi.IsDir() {
return p, errors.New("is a directory")
}
// Empty files treated as not exist because there is no content.
// IsDir must be checked first: some filesystems (e.g. overlay) report
// Empty files are treated as non-existent because there is no content.
// IsDir must be checked first: some filesystems (e.g. overlayfs) report
// directory size as 0.
if fi.Size() == 0 {
return p, os.ErrNotExist

Loading…
Cancel
Save