You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -143,10 +142,9 @@ export class SaveAsSketch extends CloudSketchContribution {
143
142
144
143
// If target does not exist, propose a `directories.user`/${sketch.name} path
145
144
// If target exists, propose `directories.user`/${sketch.name}_copy_${yyyymmddHHMMss}
145
+
// IDE2 must never prompt an invalid sketch folder name (https://github.com/arduino/arduino-ide/pull/1833#issuecomment-1412569252)
* Transforms the valid local sketch name into a valid cloud sketch name by replacing dots and dashes with underscore and trimming the length after 36 characters.
190
-
* Throws an error if `candidate` is not valid.
196
+
* Transforms the `candidate` argument into a valid sketch folder name by replacing all invalid characters with underscore (`_`) and trimming the string after 63 characters.
197
+
* If the argument is falsy, returns with `"sketch"`.
* Transforms the `candidate` argument into a valid cloud sketch folder name by replacing all invalid characters with underscore and trimming the string after 36 characters.
0 commit comments