add some tests and correct deletion path

This commit is contained in:
2021-09-05 15:01:11 +02:00
parent 924f05b2d2
commit 916f092406
5 changed files with 92 additions and 13 deletions

View File

@ -457,9 +457,11 @@ func addToVideoHandlers() {
return database.ManualSuccessResponse(err)
}
err = os.Remove(vidpath)
assembledPath := database.SettingsVideoPrefix + "/" + vidpath
err = os.Remove(assembledPath)
if err != nil {
fmt.Printf("unable to delete file: %s -- %s\n", vidpath, err.Error())
fmt.Printf("unable to delete file: %s -- %s\n", assembledPath, err.Error())
return database.ManualSuccessResponse(err)
}
}