File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
21
21
Toggle ,
22
22
truncateMiddle ,
23
23
} from '@nordicsemiconductor/pc-nrfconnect-shared' ;
24
+ import { webUtils } from 'electron' ;
24
25
25
26
import * as fileActions from '../actions/fileActions' ;
26
27
import * as jlinkTargetActions from '../actions/jlinkTargetActions' ;
@@ -58,12 +59,10 @@ const useRegisterDragEvents = () => {
58
59
59
60
// eslint-disable-next-line no-restricted-syntax
60
61
for ( const file of event . dataTransfer . files ) {
62
+ const path = webUtils . getPathForFile ( file ) ;
63
+
61
64
// eslint-disable-next-line no-await-in-loop
62
- await dispatch (
63
- fileActions . openFile (
64
- ( file as unknown as { path : string } ) . path
65
- )
66
- ) ;
65
+ await dispatch ( fileActions . openFile ( path ) ) ;
67
66
}
68
67
} ;
69
68
You can’t perform that action at this time.
0 commit comments