Delete if everything is unselected

This commit is contained in:
Ben Sarmiento
2023-11-21 14:16:53 +01:00
parent 0f336c15df
commit 48ad2bc3bf
6 changed files with 36 additions and 22 deletions

View File

@@ -82,7 +82,8 @@ func handleDeleteFile(w http.ResponseWriter, segments []string, t *torrent.Torre
return fmt.Errorf("cannot find file %s", filepath)
}
file.Link = "-"
file.Link = "unselect"
t.SetChecksum("")
w.WriteHeader(http.StatusNoContent)
return nil
}