Skip to content

Commit 7309642

Browse files
authored
Suppress codeql warning (microsoft#186029)
1 parent d0d9701 commit 7309642

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/files/browser/fileActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ export function validateFileName(pathService: IPathService, item: ExplorerItem,
720720
// Check for invalid file name.
721721
if (names.some(folderName => !pathService.hasValidBasename(item.resource, os, folderName))) {
722722
// Escape * characters
723-
const escapedName = name.replace(/\*/g, '\\*');
723+
const escapedName = name.replace(/\*/g, '\\*'); // CodeQL [SM02383] This only processes filenames which are enforced against having backslashes in them farther up in the stack.
724724
return {
725725
content: nls.localize('invalidFileNameError', "The name **{0}** is not valid as a file or folder name. Please choose a different name.", trimLongName(escapedName)),
726726
severity: Severity.Error

0 commit comments

Comments
 (0)