Fix Delete Data on Windows. Fixes #935

This commit is contained in:
DC
2016-09-19 03:11:02 -07:00
parent ad1162c7de
commit f4b2e78e72

View File

@@ -53,5 +53,6 @@ function getByKey (state, torrentKey) {
function getFileOrFolder (torrentSummary) {
const ts = torrentSummary
if (!ts.path || !ts.files || ts.files.length === 0) return null
return path.join(ts.path, ts.files[0].path.split('/')[0])
const dirname = ts.files[0].path.split(path.sep)[0]
return path.join(ts.path, dirname)
}