remove torrent data (single file / folder)

This commit is contained in:
Mathias Rasmussen
2016-07-11 02:42:56 +02:00
committed by DC
parent 897dac354d
commit a489397f84

View File

@@ -243,14 +243,10 @@ function deleteFile (path) {
})
}
// Delete all files in a torren
// Delete all files in a torrent
function moveItemToTrash (torrentSummary) {
// TODO: delete directories, not just files
torrentSummary.files.forEach(function (file) {
var filePath = path.join(torrentSummary.path, file.path)
console.log('DEBUG DELETING ' + filePath)
ipcRenderer.send('moveItemToTrash', filePath)
})
var filePath = path.join(torrentSummary.path, torrentSummary.files[0].path.split('/')[0])
ipcRenderer.send('moveItemToTrash', filePath)
}
function showItemInFolder (torrentSummary) {