input: add support for tildes in folder names (#135)

This commit is contained in:
Jason Millard
2021-07-20 11:39:53 -04:00
committed by GitHub
parent 4d6a166cb7
commit c56b66a41b
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,7 @@ class Input {
}
static isValidFolderName(folderName) {
const validFolderName = new RegExp(/^(\.|\.\/)?(\.?\w+([_-]?\w+)*\/?)*$/);
const validFolderName = new RegExp(/^(\.|\.\/)?(\.?[\w~]+([_-]?[\w~]+)*\/?)*$/);
return validFolderName.test(folderName);
}