1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

Fix $tw.utils.getSubdirectories()

This commit is contained in:
jeremy@jermolene.com 2020-04-21 21:21:38 +01:00
parent c87f4a1e94
commit d6ee700bca

View File

@ -23,9 +23,9 @@ exports.getSubdirectories = function(dirPath) {
return null;
}
var subdirs = [];
$tw.utils.each(fs.readdirSync(dirPath),function(itemPath) {
if($tw.utils.isDirectory(itemPath)) {
subdirs.push(itemPath);
$tw.utils.each(fs.readdirSync(dirPath),function(item) {
if($tw.utils.isDirectory(path.resolve(dirPath,item))) {
subdirs.push(item);
}
});
return subdirs;