File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ const path = require('path')
4
4
5
5
async function openFolderDialog ( win ) {
6
6
// https://stackoverflow.com/questions/46027287/electron-open-folder-dialog
7
- let dir = await dialog . showOpenDialog ( win , { properties : [ 'openDirectory' ] } )
7
+ const dir = await dialog . showOpenDialog ( win , { properties : [ 'openDirectory' ] } )
8
8
return dir . filePaths [ 0 ] || null
9
9
}
10
10
11
11
function listFolder ( folder ) {
12
- files = fs . readdirSync ( path . resolve ( folder ) )
12
+ let files = fs . readdirSync ( path . resolve ( folder ) )
13
13
// Filter out directories
14
14
files = files . filter ( f => {
15
15
let filePath = path . resolve ( folder , f )
@@ -38,7 +38,7 @@ function ilistFolder(folder) {
38
38
39
39
function getAllFiles ( dirPath , arrayOfFiles ) {
40
40
// https://coderrocketfuel.com/article/recursively-list-all-the-files-in-a-directory-using-node-js
41
- files = ilistFolder ( dirPath )
41
+ let files = ilistFolder ( dirPath )
42
42
arrayOfFiles = arrayOfFiles || [ ]
43
43
files . forEach ( function ( file ) {
44
44
const p = path . join ( dirPath , file . path )
You can’t perform that action at this time.
0 commit comments