From 17c38b1ec5311411f6dc23c4c04abcf8c4d340b3 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Thu, 12 Feb 2015 14:44:10 +0100 Subject: [PATCH 1/3] fix problem if edition search path is TIDDLYWIKI_EDITION_PATH=c:\test; because the trailing semicolon creates an empty directory name. --- boot/boot.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 081603e82..525df34a1 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1544,9 +1544,15 @@ Returns an array of search paths */ $tw.getLibraryItemSearchPaths = function(libraryPath,envVar) { var pluginPaths = [path.resolve($tw.boot.corePath,libraryPath)], - env = process.env[envVar]; + env = process.env[envVar], + paths = []; if(env) { - Array.prototype.push.apply(pluginPaths,env.split(path.delimiter)); + env.split(path.delimiter).map(function(item){ + if(item) { + paths.push(item) + } + }); + Array.prototype.push.apply(pluginPaths,paths); } return pluginPaths; }; From 95d7a826f02f1a4fb727384bc15159cfaa0edc4a Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Thu, 12 Feb 2015 20:03:20 +0100 Subject: [PATCH 2/3] space added --- boot/boot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/boot.js b/boot/boot.js index 525df34a1..79510a311 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1547,7 +1547,7 @@ $tw.getLibraryItemSearchPaths = function(libraryPath,envVar) { env = process.env[envVar], paths = []; if(env) { - env.split(path.delimiter).map(function(item){ + env.split(path.delimiter).map(function(item) { if(item) { paths.push(item) } From e1b57bf9e5ac3f82bbbb4b29d1ff66bff6e5316c Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Tue, 17 Feb 2015 01:29:42 +0100 Subject: [PATCH 3/3] remove temporary variable --- boot/boot.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 79510a311..dee777c54 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1544,15 +1544,13 @@ Returns an array of search paths */ $tw.getLibraryItemSearchPaths = function(libraryPath,envVar) { var pluginPaths = [path.resolve($tw.boot.corePath,libraryPath)], - env = process.env[envVar], - paths = []; + env = process.env[envVar]; if(env) { env.split(path.delimiter).map(function(item) { if(item) { - paths.push(item) + pluginPaths.push(item) } }); - Array.prototype.push.apply(pluginPaths,paths); } return pluginPaths; };