mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
fix problem if edition search path is TIDDLYWIKI_EDITION_PATH=c:\test; because the trailing semicolon creates an empty directory name.
This commit is contained in:
parent
ddac13317e
commit
17c38b1ec5
10
boot/boot.js
10
boot/boot.js
@ -1544,9 +1544,15 @@ Returns an array of search paths
|
|||||||
*/
|
*/
|
||||||
$tw.getLibraryItemSearchPaths = function(libraryPath,envVar) {
|
$tw.getLibraryItemSearchPaths = function(libraryPath,envVar) {
|
||||||
var pluginPaths = [path.resolve($tw.boot.corePath,libraryPath)],
|
var pluginPaths = [path.resolve($tw.boot.corePath,libraryPath)],
|
||||||
env = process.env[envVar];
|
env = process.env[envVar],
|
||||||
|
paths = [];
|
||||||
if(env) {
|
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;
|
return pluginPaths;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user