Merge pull request #667 from anderbubble/485-fix-overlay-ls-header
Correct header for overlay list -al
This commit is contained in:
@@ -39,16 +39,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
files := util.FindFiles(path)
|
||||
|
||||
wwlog.Debug("Iterating overlay path: %s", path)
|
||||
if ListContents {
|
||||
var fileCount int
|
||||
for file := range files {
|
||||
fmt.Printf("%-30s /%-12s\n", name, files[file])
|
||||
fileCount++
|
||||
}
|
||||
if fileCount == 0 {
|
||||
fmt.Printf("%-30s %-12d\n", name, 0)
|
||||
}
|
||||
} else if ListLong {
|
||||
if ListLong {
|
||||
for file := range files {
|
||||
s, err := os.Stat(files[file])
|
||||
if err != nil {
|
||||
@@ -61,7 +52,15 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
sys := s.Sys()
|
||||
|
||||
fmt.Printf("%v %5d %-5d %-18s /%s\n", perms, sys.(*syscall.Stat_t).Uid, sys.(*syscall.Stat_t).Gid, overlays[o], files[file])
|
||||
|
||||
}
|
||||
} else if ListContents {
|
||||
var fileCount int
|
||||
for file := range files {
|
||||
fmt.Printf("%-30s /%-12s\n", name, files[file])
|
||||
fileCount++
|
||||
}
|
||||
if fileCount == 0 {
|
||||
fmt.Printf("%-30s %-12d\n", name, 0)
|
||||
}
|
||||
} else {
|
||||
fmt.Printf("%-30s %-12d\n", name, len(files))
|
||||
|
||||
Reference in New Issue
Block a user