Skip to content

Commit 99e14eb

Browse files
committed
Workaround Marlin cannot handle spaces in file names / directory names
remove debug messages bump version
1 parent 517ebc8 commit 99e14eb

File tree

24 files changed

+66
-32
lines changed

24 files changed

+66
-32
lines changed

dist/CNC/GRBL/index.html.gz

15 Bytes
Binary file not shown.

dist/CNC/GRBLHal/index.html.gz

29 Bytes
Binary file not shown.
32 Bytes
Binary file not shown.
36 Bytes
Binary file not shown.
26 Bytes
Binary file not shown.
16 Bytes
Binary file not shown.

dist/SandTable/GRBL/index.html.gz

16 Bytes
Binary file not shown.

src/components/App/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
import { h } from "preact"
1919
import { webUIbuild } from "../../targets"
20-
export const webUIversion = "3.0.0-a15"
20+
export const webUIversion = "3.0.0-a16"
2121
export const Esp3dVersion = () => (
2222
<span>
2323
{webUIversion}.{webUIbuild}

src/components/Panels/Files.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,26 @@ const FilesPanel = () => {
190190
formData.append("path", currentPath[currentFS])
191191
for (let i = 0; i < list.length; i++) {
192192
const file = list[i]
193+
194+
let fileName = ""
195+
const needFormatFileName = files.command(
196+
currentFS,
197+
"needFormatFileName",
198+
currentPath[currentFS],
199+
fileref.current.files[0].name
200+
)
201+
if (
202+
needFormatFileName.type != "error" &&
203+
needFormatFileName.name
204+
) {
205+
fileName = needFormatFileName.name
206+
} else {
207+
fileName = file.name
208+
}
193209
const arg =
194210
currentPath[currentFS] +
195211
(currentPath[currentFS] == "/" ? "" : "/") +
196-
file.name +
212+
fileName +
197213
"S"
198214
//append file size first to check updload is complete
199215
formData.append(arg, file.size)
@@ -202,7 +218,7 @@ const FilesPanel = () => {
202218
file,
203219
currentPath[currentFS] +
204220
(currentPath[currentFS] == "/" ? "" : "/") +
205-
file.name
221+
fileName
206222
)
207223
}
208224
//now do request

src/targets/CNC/GRBL/CMD-source.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ const responseSteps = {
7474
function capability() {
7575
const [cap, ...rest] = arguments
7676
if (capabilities[cap]) return capabilities[cap](...rest)
77-
console.log("Unknow capability ", cap)
77+
//console.log("Unknow capability ", cap)
7878
return false
7979
}
8080

8181
function command() {
8282
const [cmd, ...rest] = arguments
8383
if (commands[cmd]) return commands[cmd](...rest)
84-
console.log("Unknow command ", cmd)
84+
//console.log("Unknow command ", cmd)
8585
return { type: "error" }
8686
}
8787

0 commit comments

Comments
 (0)