@epic-web/workshop-app 5.3.6 → 5.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/server/index.js
CHANGED
|
@@ -5364,13 +5364,11 @@ async function launchEditor(pathList, lineNumber = 1, colNumber = 1) {
|
|
|
5364
5364
|
if (process.platform === "linux" && fileName.startsWith("/mnt/") && /Microsoft/i.test(os.release())) {
|
|
5365
5365
|
fileName = path$1.relative("", fileName);
|
|
5366
5366
|
}
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
fileName.replace(/\+|\$|\[|\]/g, "").trim()
|
|
5370
|
-
)) {
|
|
5367
|
+
const fileExists = fs.existsSync(fileName);
|
|
5368
|
+
if (!fileExists && process.platform === "win32" && !WINDOWS_FILE_NAME_WHITELIST.test(fileName)) {
|
|
5371
5369
|
acc.errorsList.push(fileName);
|
|
5372
5370
|
} else {
|
|
5373
|
-
if (!
|
|
5371
|
+
if (!fileExists) {
|
|
5374
5372
|
fsExtra.ensureDirSync(path$1.dirname(fileName));
|
|
5375
5373
|
fsExtra.writeFileSync(fileName, "", "utf8");
|
|
5376
5374
|
}
|
|
@@ -5387,7 +5385,7 @@ async function launchEditor(pathList, lineNumber = 1, colNumber = 1) {
|
|
|
5387
5385
|
message = `Could not open ${readableName} in the editor.
|
|
5388
5386
|
|
|
5389
5387
|
When running on Windows, file names are checked against a whitelist to protect against remote code execution attacks.
|
|
5390
|
-
File names may consist only of alphanumeric characters (all languages), periods, dashes, slashes, and underscores.`;
|
|
5388
|
+
File names may consist only of alphanumeric characters (all languages), periods, dashes, slashes, and underscores. Maybe you have your files in a folder that includes a space in the pathname? Rename the folder to remove the space and try again.`;
|
|
5391
5389
|
} else {
|
|
5392
5390
|
message = "pathList must contain at least one valid file path";
|
|
5393
5391
|
}
|