mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 14:44:40 +02:00
Add GLOB support to oputil fb scan...
This commit is contained in:
parent
f6f1de4bd8
commit
9c87d45433
3 changed files with 32 additions and 2 deletions
|
@ -15,6 +15,7 @@ exports.getDefaultConfigPath = getDefaultConfigPath;
|
|||
exports.getConfigPath = getConfigPath;
|
||||
exports.initConfigAndDatabases = initConfigAndDatabases;
|
||||
exports.getAreaAndStorage = getAreaAndStorage;
|
||||
exports.looksLikePattern = looksLikePattern;
|
||||
|
||||
const exitCodes = exports.ExitCodes = {
|
||||
SUCCESS : 0,
|
||||
|
@ -87,4 +88,13 @@ function getAreaAndStorage(tags) {
|
|||
}
|
||||
return entry;
|
||||
});
|
||||
}
|
||||
|
||||
function looksLikePattern(tag) {
|
||||
// globs can start with @
|
||||
if(tag.indexOf('@') > 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return /[*?[\]!()+|^]/.test(tag);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue