Handle deletes better
This commit is contained in:
@@ -32,6 +32,10 @@ func HandleDeleteFile(directory, torrentName, fileName string, t *torrent.Torren
|
||||
return fmt.Errorf("cannot find file %s", fileName)
|
||||
}
|
||||
file.Link = "unselect"
|
||||
t.UpdateTorrentResponseCache(torrent)
|
||||
if t.CheckDeletedState(torrent) {
|
||||
t.Delete(torrentName, true, true)
|
||||
} else {
|
||||
t.UpdateTorrentResponseCache(torrent)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user