Seed in place, don't copy to /tmp

Fixes https://github.com/feross/webtorrent-desktop/issues/254
This commit is contained in:
DC
2016-04-01 03:37:22 -07:00
parent c975f2f2d0
commit 20157f39ee
5 changed files with 133 additions and 13 deletions

View File

@@ -117,12 +117,14 @@ function getMenuItem (label) {
// Prompts the user for a file or folder, then makes a torrent out of the data
function showCreateTorrent () {
// Allow only a single selection
// To create a multi-file torrent, the user must select a folder
electron.dialog.showOpenDialog({
title: 'Select a file or folder for the torrent file.',
properties: [ 'openFile', 'openDirectory', 'multiSelections' ]
properties: [ 'openFile', 'openDirectory' ]
}, function (filenames) {
if (!Array.isArray(filenames)) return
windows.main.send('dispatch', 'seed', filenames)
windows.main.send('dispatch', 'seed', filenames[0])
})
}