mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-16 06:18:58 +00:00
Merge pull request #9781 from gaohuatao-1/ght/shm
This commit is contained in:
@@ -388,7 +388,11 @@ func countFiles(path string, limit int) (numFiles int, err error) {
|
|||||||
if file.IsDir() {
|
if file.IsDir() {
|
||||||
inc, err := countFiles(filepath.Join(path, file.Name()), (limit - numFiles))
|
inc, err := countFiles(filepath.Join(path, file.Name()), (limit - numFiles))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return numFiles, err
|
return 0, err
|
||||||
|
}
|
||||||
|
// exceeded limit
|
||||||
|
if inc == -1 {
|
||||||
|
return -1, nil
|
||||||
}
|
}
|
||||||
numFiles = numFiles + inc
|
numFiles = numFiles + inc
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user