1. Paul Ruane
  2. tmsu

Commits

Paul Ruane  committed daae0d5

Improved error handling in 'files' command.

  • Participants
  • Parent commits 505fcad
  • Branches default

Comments (0)

Files changed (1)

File src/main/commands/files.go

View file
     if error != nil { return error }
     defer db.Close()
 
+    for _, tagName := range tagNames {
+        tag, error := db.TagByName(tagName)
+        if error != nil { return error }
+        if tag == nil { return errors.New("No such tag '" + tagName + "'.") }
+    }
+
     files, error := db.FilesWithTags(tagNames)
     if error != nil { return error }