1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-01 16:13:00 +00:00

makelibrary command should skip non-directories

Fixes #4583
This commit is contained in:
jeremy@jermolene.com
2020-04-20 11:47:54 +01:00
parent 15d7255728
commit 678e25f510
2 changed files with 18 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ Command.prototype.execute = function() {
tiddlers = {};
// Collect up the library plugins
var collectPlugins = function(folder) {
var pluginFolders = fs.readdirSync(folder);
var pluginFolders = $tw.utils.getSubdirectories(folder);
for(var p=0; p<pluginFolders.length; p++) {
if(!$tw.boot.excludeRegExp.test(pluginFolders[p])) {
pluginFields = $tw.loadPluginFolder(path.resolve(folder,"./" + pluginFolders[p]));
@@ -44,7 +44,7 @@ Command.prototype.execute = function() {
}
},
collectPublisherPlugins = function(folder) {
var publisherFolders = fs.readdirSync(folder);
var publisherFolders = $tw.utils.getSubdirectories(folder);
for(var t=0; t<publisherFolders.length; t++) {
if(!$tw.boot.excludeRegExp.test(publisherFolders[t])) {
collectPlugins(path.resolve(folder,"./" + publisherFolders[t]));