Inspect: Preserve permission flags (#13490)

Preserve permission from disk files. Can help identify issues.

Refactor GetRawData function to be cleaner.
This commit is contained in:
Klaus Post
2021-10-21 11:20:13 -07:00
committed by GitHub
parent ac36a377b0
commit 23d6770ff9
5 changed files with 46 additions and 16 deletions

View File

@@ -2270,7 +2270,7 @@ func (s *xlStorage) StatInfoFile(ctx context.Context, volume, path string, glob
if os.PathSeparator != '/' {
name = strings.Replace(name, string(os.PathSeparator), "/", -1)
}
stat = append(stat, StatInfo{ModTime: st.ModTime(), Size: st.Size(), Name: name, Dir: st.IsDir()})
stat = append(stat, StatInfo{ModTime: st.ModTime(), Size: st.Size(), Name: name, Dir: st.IsDir(), Mode: uint32(st.Mode())})
}
return stat, nil
}