Don't hardcode paths
This commit is contained in:
parent
15614a147c
commit
66a4a2de4c
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
title, err := ParseFile(path)
|
title, err := ParseFile(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Remove(NEW_PATH + path)
|
os.Remove(NEW_PATH + path)
|
||||||
sess.Notify("Problem uploading!", "The file '"+path[len("new/"):]+"' is not a well formed epub", "error")
|
sess.Notify("Problem uploading!", "The file '"+path+"' is not a well formed epub", "error")
|
||||||
} else {
|
} else {
|
||||||
uploaded = uploaded + " '" + title + "'"
|
uploaded = uploaded + " '" + title + "'"
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue