summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2021-04-17 02:21:12 +0200
committerache <ache@ache.one>2021-04-17 02:21:12 +0200
commit939ba84c43c6c740bff027bd7eeb1b175a96fd46 (patch)
tree5307ef7a2a58cf1251744e12363bcf6bc348dc76
parentTrully Allow Hidden File / Directory (diff)
Log moving
-rw-r--r--server.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/server.go b/server.go
index 9b1cc1a..4bb2435 100644
--- a/server.go
+++ b/server.go
@@ -160,7 +160,9 @@ func handleGet( w http.ResponseWriter, r *http.Request, headOnly bool) {
}
name := "davy - " + filename
err = tmpl.Execute(w, Collection{ name, cols, files})
- fmt.Println(err)
+ if err != nil {
+ fmt.Println(err)
+ }
case stat.Mode().IsRegular():
if !headOnly {
@@ -292,7 +294,7 @@ func handleOptions( w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK);
}
func handleCopy( w http.ResponseWriter, r *http.Request) {
- fmt.Println("The body of the request isn't empty. It should be.")
+ fmt.Println(w, "The body of the request isn't empty. It should be.")
}
func handleMove( w http.ResponseWriter, r *http.Request) {
filename := r.URL.Path[1:]
@@ -304,6 +306,7 @@ func handleMove( w http.ResponseWriter, r *http.Request) {
}
if verifyEmptyBody(w, r) != nil { return }
+ fmt.Println("Moving ", filename, " => ", dest)
fmt.Println(dest)
return