Skip to content

Commit

Permalink
data -> source path
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Aug 10, 2017
1 parent 1ec54ed commit 8a07fb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func slashLogin(c *gin.Context) {
func slashLoginPOST(c *gin.Context) {
loginGroup := sessions.Default(c)
group := strings.ToLower(c.PostForm("group"))
if _, err := os.Stat(path.Join("data", group+".db")); err == nil {
if _, err := os.Stat(path.Join(RuntimeArgs.SourcePath, group+".db")); err == nil {
loginGroup.Set("group", group)
loginGroup.Save()
c.Redirect(302, "/dashboard/"+group)
Expand Down
2 changes: 1 addition & 1 deletion svm.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func calculateSVM(group string) error {
// }

cmd := "svm-train"
args := "-s 0 -t 0 -b 1 " + tempFileFull + " data/" + group + ".model"
args := "-s 0 -t 0 -b 1 " + tempFileFull + " " + RuntimeArgs.SourcePath + "/" + group + ".model"
Debug.Println(cmd, args)
if _, err = exec.Command(cmd, strings.Split(args, " ")...).Output(); err != nil {
panic(err)
Expand Down

0 comments on commit 8a07fb1

Please sign in to comment.