mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +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:
		
							
								
								
									
										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; | ||||||
| }; | }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Mario Pietsch
					Mario Pietsch