We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 38faf8c commit eea47c1Copy full SHA for eea47c1
1 file changed
pkg/distribution/packaging/dirtar.go
@@ -41,14 +41,17 @@ func CreateDirectoryTarArchive(dirPath string) (string, error) {
41
42
// Walk the directory tree
43
err = filepath.Walk(dirPath, func(path string, info os.FileInfo, err error) error {
44
+ if err != nil {
45
+ return err
46
+ }
47
+ if info == nil {
48
+ return fmt.Errorf("nil FileInfo for path: %s", path)
49
50
// Skip symlinks - they're not needed for model distribution and are
51
// skipped during extraction for security reasons
52
if info.Mode()&os.ModeSymlink != 0 {
53
return nil
54
}
- if err != nil {
- return err
- }
55
56
// Create tar header
57
header, err := tar.FileInfoHeader(info, "")
0 commit comments