Commits

Paul Ruane committed 18f0f40

'status' command now ignores hidden files.

  • Participants
  • Parent commits d5704d3

Comments (0)

Files changed (1)

File src/main/commands/status.go

     absPath, error := filepath.Abs(path)
     if error != nil { return nil, error }
 
-    if isRegular(fileInfo)  {
-        entries = append(entries, absPath)
-    } else if fileInfo.IsDir() {
-        childEntries, error := directoryEntries(absPath)
-        if error != nil { return nil, error }
+    basename := filepath.Base(absPath)
 
-        for _, entry := range childEntries {
-            entries, error = this.getFileSystemEntriesRecursive(entry, entries)
+    if basename[0] != '.' {
+        if isRegular(fileInfo)  {
+            entries = append(entries, absPath)
+        } else if fileInfo.IsDir() {
+            childEntries, error := directoryEntries(absPath)
             if error != nil { return nil, error }
+
+            for _, entry := range childEntries {
+                entries, error = this.getFileSystemEntriesRecursive(entry, entries)
+                if error != nil { return nil, error }
+            }
         }
     }