Skip to content

Commit 85c937d

Browse files
committed
Fix path resolution
Making sure relative path won't contain initial separator
1 parent 20fcc7a commit 85c937d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/arduino/store.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ async function uploadFolder(srcPath, destPath, dataConsumer) {
15091509
let allFiles = await disk.ilistAllFiles(srcPath)
15101510
for (let i in allFiles) {
15111511
const file = allFiles[i]
1512-
const relativePath = file.path.substring(srcPath.length)
1512+
const relativePath = file.path.substring(srcPath.length+1)
15131513
if (file.type === 'folder') {
15141514
await serial.createFolder(
15151515
serial.getFullPath(
@@ -1523,7 +1523,7 @@ async function uploadFolder(srcPath, destPath, dataConsumer) {
15231523
disk.getFullPath(srcPath, relativePath, ''),
15241524
serial.getFullPath(destPath, relativePath, ''),
15251525
(progress) => {
1526-
dataConsumer(progress, relativePath.slice(1))
1526+
dataConsumer(progress, relativePath)
15271527
}
15281528
)
15291529
}

0 commit comments

Comments
 (0)