feat: cannot use create-index for short folders (#51)
* feat: file cannot be started from _ and be one symbol * test: add children-directories-short-name for readDirectory
This commit is contained in:
@@ -17,7 +17,7 @@ const hasMultipleExtensions = (fileName) => {
|
||||
};
|
||||
|
||||
const isSafeName = (fileName) => {
|
||||
return /^[a-z][a-z0-9._]+$/i.test(fileName);
|
||||
return /^[a-z_][a-z0-9._]*$/i.test(fileName);
|
||||
};
|
||||
|
||||
const stripExtension = (fileName) => {
|
||||
|
||||
Reference in New Issue
Block a user