mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-11-01 01:42:17 +08:00 
			
		
		
		
	fix path length check with fast_init set
This commit is contained in:
		
							
								
								
									
										16
									
								
								vendor/lib/lib_path.cmd
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/lib/lib_path.cmd
									
									
									
									
										vendored
									
									
								
							| @@ -113,18 +113,20 @@ exit /b | |||||||
|     :end_enhance_path |     :end_enhance_path | ||||||
|     set "PATH=%PATH:;;=;%" |     set "PATH=%PATH:;;=;%" | ||||||
|  |  | ||||||
|  |     REM echo %path%|"C:\Users\dgames\cmder - dev\vendor\git-for-windows\usr\bin\wc" -c | ||||||
|  |     if "%fast_init%" == "1" exit /b | ||||||
|  |  | ||||||
|     if not "%OLD_PATH:~0,3000%" == "%OLD_PATH:~0,3001%" goto :toolong |     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 |     if not "%OLD_PATH%" == "%PATH%" goto :changed | ||||||
|     exit /b |     exit /b | ||||||
|  |  | ||||||
|     :toolong |     :toolong | ||||||
|     echo %OLD_PATH%>tempfileA |       echo %OLD_PATH%>tempfileA | ||||||
|     echo %PATH%>tempfileB |       echo %PATH%>tempfileB | ||||||
|     fc /b tempfileA tempfileB 2>nul 1>nul |       fc /b tempfileA tempfileB 2>nul 1>nul | ||||||
|     if errorlevel 1 ( del tempfileA & del tempfileB & goto :changed ) |       if errorlevel 1 ( del tempfileA & del tempfileB & goto :changed ) | ||||||
|     del tempfileA & del tempfileB |       del tempfileA & del tempfileB | ||||||
|     exit /b |       exit /b | ||||||
|  |  | ||||||
|     :changed |     :changed | ||||||
|       %print_debug%  :enhance_path "END Env Var - PATH=%path%" |       %print_debug%  :enhance_path "END Env Var - PATH=%path%" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user