mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-28 13:36:16 +02:00
Add Ability to Import All File Areas at Once #271
* Simple wildcard support for area tags param
This commit is contained in:
parent
d6dce82a92
commit
14f7ca9dcc
4 changed files with 41 additions and 3 deletions
|
@ -521,7 +521,24 @@ function scanFileAreas() {
|
|||
});
|
||||
},
|
||||
function scanAreas(callback) {
|
||||
fileArea = require('../../core/file_base_area.js');
|
||||
fileArea = require('../../core/file_base_area');
|
||||
|
||||
// Further expand any wildcards
|
||||
let areaAndStorageInfoExpanded = [];
|
||||
options.areaAndStorageInfo.forEach(info => {
|
||||
if (info.areaTag.indexOf('*') > -1) {
|
||||
const areas = fileArea.getFileAreasByTagWildcardRule(info.areaTag);
|
||||
areas.forEach(area => {
|
||||
areaAndStorageInfoExpanded.push(Object.assign({}, info, {
|
||||
areaTag : area.areaTag,
|
||||
}));
|
||||
});
|
||||
} else {
|
||||
areaAndStorageInfoExpanded.push(info);
|
||||
}
|
||||
});
|
||||
|
||||
options.areaAndStorageInfo = areaAndStorageInfoExpanded;
|
||||
|
||||
async.eachSeries(options.areaAndStorageInfo, (areaAndStorage, nextAreaTag) => {
|
||||
const areaInfo = fileArea.getFileAreaByTag(areaAndStorage.areaTag);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue