mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 17:32:27 +08:00 
			
		
		
		
	fix failure in lib_path if path is too long
This commit is contained in:
		
							
								
								
									
										21
									
								
								vendor/lib/lib_path.cmd
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								vendor/lib/lib_path.cmd
									
									
									
									
										vendored
									
									
								
							| @@ -112,13 +112,28 @@ exit /b | |||||||
|  |  | ||||||
|     :end_enhance_path |     :end_enhance_path | ||||||
|     set "PATH=%PATH:;;=;%" |     set "PATH=%PATH:;;=;%" | ||||||
|     if NOT "%OLD_PATH%" == "%PATH%" ( |  | ||||||
|  |     if not "%OLD_PATH:~0,3000%" == "%OLD_PATH:~0,3001%" goto :toolong | ||||||
|  |     if not "%PATH:~0,3000%" == "%PATH:~0,3001%" goto :toolong | ||||||
|  |     if not "%OLD_PATH%" == "%PATH%" goto :changed | ||||||
|  |     exit /b | ||||||
|  |  | ||||||
|  |     :toolong | ||||||
|  |     echo %OLD_PATH%>tempfileA | ||||||
|  |     echo %PATH%>tempfileB | ||||||
|  |     fc /b tempfileA tempfileB 2>nul 1>nul | ||||||
|  |     if errorlevel 1 ( del tempfileA & del tempfileB & goto :changed ) | ||||||
|  |     del tempfileA & del tempfileB | ||||||
|  |     exit /b | ||||||
|  |  | ||||||
|  |     :changed | ||||||
|       %print_debug%  :enhance_path "END Env Var - PATH=%path%" |       %print_debug%  :enhance_path "END Env Var - PATH=%path%" | ||||||
|       %print_debug%  :enhance_path "Env Var %find_query% - found=%found%" |       %print_debug%  :enhance_path "Env Var %find_query% - found=%found%" | ||||||
|     ) |       exit /b | ||||||
|     set "position=" |  | ||||||
|     exit /b |     exit /b | ||||||
|  |  | ||||||
|  |  | ||||||
| :set_found | :set_found | ||||||
|     if "%ERRORLEVEL%" == "0" ( |     if "%ERRORLEVEL%" == "0" ( | ||||||
|       set found=1 |       set found=1 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user