Fix rewrites

This commit is contained in:
Ben Sarmiento
2024-05-22 02:26:20 +02:00
parent a9cc689702
commit 9990bf90ca
10 changed files with 149 additions and 114 deletions

View File

@@ -37,8 +37,7 @@ func HandleDeleteFile(directory, torrentName, fileName string, torMgr *torrent.T
if dirCfg.OnlyShowTheBiggestFile {
torMgr.Delete(torrentName, true)
} else {
err := file.State.Event(context.Background(), "delete_file")
if err != nil {
if err := file.State.Event(context.Background(), "delete_file"); err != nil {
return fmt.Errorf("cannot delete file %s: %v", fileName, err)
}
if torMgr.CheckDeletedStatus(torrent) {