Commits

Paul Ruane  committed 36b2a92

'dupes' command no longer lists every directory if passed a directory.

  • Participants
  • Parent commits 95706bd

Comments (0)

Files changed (1)

File src/tmsu/cli/commands/dupes.go

 			log.Infof("%v: identifying duplicate files.\n", path)
 		}
 
-		fingerprint, err := fingerprint.Create(path)
+		fp, err := fingerprint.Create(path)
 		if err != nil {
 			return fmt.Errorf("%v: could not create fingerprint: %v", path, err)
 		}
 
-		files, err := store.FilesByFingerprint(fingerprint)
+		if fp == fingerprint.Fingerprint("") {
+			return nil
+		}
+
+		files, err := store.FilesByFingerprint(fp)
 		if err != nil {
-			return fmt.Errorf("%v: could not retrieve files matching fingerprint '%v': %v", path, fingerprint, err)
+			return fmt.Errorf("%v: could not retrieve files matching fingerprint '%v': %v", path, fp, err)
 		}
 
 		absPath, err := filepath.Abs(path)