Skip to content

Commit 1b923cd

Browse files
committed
Filter out dot files and folder
1 parent c5e47fe commit 1b923cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ui/arduino/store.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ function store(state, emitter) {
182182
await serial.stop()
183183
try {
184184
state.serialFiles = await serial.listFiles()
185+
state.serialFiles = state.serialFiles.filter(
186+
f => f.indexOf('.') !== -1 // Only files with extensions
187+
)
188+
state.serialFiles = state.serialFiles.filter(
189+
f => f.indexOf('.') !== 0 // No dot files
190+
)
185191
} catch (e) {
186192
console.log('error', e)
187193
}

0 commit comments

Comments
 (0)