proper marking of file as deleted
This commit is contained in:
@@ -254,6 +254,12 @@ func (t *TorrentManager) getInfo(torrentID string) *Torrent {
|
||||
return torrent
|
||||
}
|
||||
|
||||
func (t *TorrentManager) MarkFileAsDeleted(torrent *Torrent, file *File) {
|
||||
log.Println("Marking file as deleted", file.Path)
|
||||
file.Link = ""
|
||||
t.writeToFile(torrent.ID, torrent)
|
||||
}
|
||||
|
||||
func (t *TorrentManager) GetInfo(torrentID string) *Torrent {
|
||||
for i := range t.torrents {
|
||||
if t.torrents[i].ID == torrentID {
|
||||
|
||||
Reference in New Issue
Block a user