From 17c38b1ec5311411f6dc23c4c04abcf8c4d340b3 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Thu, 12 Feb 2015 14:44:10 +0100 Subject: [PATCH] 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; };