mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 09:22:15 +08:00 
			
		
		
		
	Merge pull request #427 from kodybrown/development
Added code to check for the existence of a customized ini file..
This commit is contained in:
		| @@ -113,8 +113,21 @@ void StartCmder(std::wstring path, bool is_single_mode) | |||||||
| 	PathRemoveFileSpec(exeDir); | 	PathRemoveFileSpec(exeDir); | ||||||
|  |  | ||||||
| 	PathCombine(icoPath, exeDir, L"icons\\cmder.ico"); | 	PathCombine(icoPath, exeDir, L"icons\\cmder.ico"); | ||||||
| 	PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml"); |  | ||||||
| 	PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml"); | 	// Check for machine-specific config file. | ||||||
|  | 	PathCombine(oldCfgPath, exeDir, L"config\\ConEmu-%COMPUTERNAME%.xml"); | ||||||
|  | 	ExpandEnvironmentStrings(oldCfgPath, oldCfgPath, sizeof(oldCfgPath) / sizeof(oldCfgPath[0])); | ||||||
|  | 	if (!PathFileExists(oldCfgPath)) { | ||||||
|  | 		PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml"); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	// Check for machine-specific config file. | ||||||
|  | 	PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu-%COMPUTERNAME%.xml"); | ||||||
|  | 	ExpandEnvironmentStrings(cfgPath, cfgPath, sizeof(cfgPath) / sizeof(cfgPath[0])); | ||||||
|  | 	if (!PathFileExists(cfgPath)) { | ||||||
|  | 		PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml"); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe"); | 	PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe"); | ||||||
|  |  | ||||||
| 	if (FileExists(oldCfgPath) && !FileExists(cfgPath)) | 	if (FileExists(oldCfgPath) && !FileExists(cfgPath)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user