Skip to content

Commit

Permalink
Fixed a bug that allowed the creation of a category called all
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperNinja-4965 committed Oct 28, 2020
1 parent 90d0cb5 commit 2a171ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bin/
Build.bat
Build-and-Run.bat
Linux-Build/
2 changes: 2 additions & 0 deletions NewCategory.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ func CreateCategory(name string) error {
return errors.New("You cannot name your category that.")
} else if strings.ToLower(name) == "search" {
return errors.New("You cannot name your category that.")
} else if strings.ToLower(name) == "all" {
return errors.New("You cannot name your category that.")
} else {
// checks to make sure that the category doesnt already exist.
if _, err := os.Stat(ExecPath + "/data/" + name + ".csv"); os.IsNotExist(err) {
Expand Down

0 comments on commit 2a171ab

Please sign in to comment.