Sort files by path when sorting by inode number is not supported
authorMikael Berthe <mikael@lilotux.net>
Sun, 29 Jun 2014 15:07:04 +0200
changeset 11 47e45453b705
parent 10 1ee01b135e0e
child 12 15e3580cfb8d
Sort files by path when sorting by inode number is not supported
goduf-byinode_fallback.go
--- a/goduf-byinode_fallback.go	Sun Jun 29 14:52:21 2014 +0200
+++ b/goduf-byinode_fallback.go	Sun Jun 29 15:07:04 2014 +0200
@@ -11,7 +11,7 @@
 func (a ByInode) Len() int      { return len(a) }
 func (a ByInode) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
 func (a ByInode) Less(i, j int) bool {
-	return true
+	return a[i].FilePath < a[j].FilePath
 }
 
 // OSHasInodes returns true iff the O.S. uses inodes for its filesystems.