mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-04-21 04:41:06 -07:00
makelibrary command: Guard against invalid directories
This commit is contained in:
parent
678e25f510
commit
5688670da6
1 changed files with 2 additions and 2 deletions
|
|
@ -33,7 +33,7 @@ Command.prototype.execute = function() {
|
|||
tiddlers = {};
|
||||
// Collect up the library plugins
|
||||
var collectPlugins = function(folder) {
|
||||
var pluginFolders = $tw.utils.getSubdirectories(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 = $tw.utils.getSubdirectories(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]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue