fix(download): fix download to directory after update
This commit is contained in:
		@ -40,14 +40,15 @@ export default (props) => {
 | 
				
			|||||||
				</g>
 | 
									</g>
 | 
				
			||||||
			</svg>
 | 
								</svg>
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			{name: __('Download to') + '...', click: () => {
 | 
								{name: __('Download to') + '...', click: async () => {
 | 
				
			||||||
				if(dialog)
 | 
									if(dialog)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					const path = dialog.showOpenDialog({
 | 
										const path = (await dialog.showOpenDialog({
 | 
				
			||||||
						properties: ['openDirectory']
 | 
											properties: ['openDirectory']
 | 
				
			||||||
					});
 | 
										})).filePaths;
 | 
				
			||||||
					if(!path || path.length < 1)
 | 
										if(!path || path.length < 1)
 | 
				
			||||||
						return
 | 
											return
 | 
				
			||||||
 | 
										console.log(path);
 | 
				
			||||||
					window.torrentSocket.emit('download', props.torrent, path[0], (added) => {
 | 
										window.torrentSocket.emit('download', props.torrent, path[0], (added) => {
 | 
				
			||||||
						if(props.onAdded)
 | 
											if(props.onAdded)
 | 
				
			||||||
							props.onAdded(added)
 | 
												props.onAdded(added)
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user