Skip to content

Commit

Permalink
Implemented getPathSeparator to initially define state.navigationPath.
Browse files Browse the repository at this point in the history
  • Loading branch information
ubidefeo committed Mar 15, 2024
1 parent 043d0b8 commit a66ee04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ const Disk = {
renameFile: async (oldName, newName) => {
return ipcRenderer.invoke('rename-file', oldName, newName)
},
getPathSeparator: () => {
return path.sep
},
getNavigationPath: (navigation, target) => {
return path.join(navigation, target)
},
Expand Down
3 changes: 1 addition & 2 deletions ui/arduino2/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async function store(state, emitter) {
win.setWindowSize(720, 640)

state.view = 'editor'
state.diskNavigationPath = '/'
state.diskNavigationPath = disk.getPathSeparator()
state.diskNavigationRoot = getDiskNavigationRootFromStorage()
state.diskFiles = []
state.boardNavigationPath = '/'
Expand Down Expand Up @@ -694,7 +694,6 @@ async function store(state, emitter) {
state.currentFSItem = file.fileName
state.transferringProgress = null
if (file.type === 'folder') {

let serialPath = await serial.getFullPath('/', state.boardNavigationPath, file.fileName)
// log('deleteBoardFolder', serialPath)
await deleteBoardFolder(serialPath)
Expand Down

0 comments on commit a66ee04

Please sign in to comment.