mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-10-31 09:22:15 +08:00 
			
		
		
		
	add use-ConEmu.xml
This commit is contained in:
		| @@ -118,15 +118,25 @@ void StartCmder(std::wstring path, bool is_single_mode) | |||||||
| 	PathCombine(icoPath, exeDir, L"icons\\cmder.ico"); | 	PathCombine(icoPath, exeDir, L"icons\\cmder.ico"); | ||||||
|  |  | ||||||
| 	// Check for machine-specific config file. | 	// Check for machine-specific config file. | ||||||
| 	PathCombine(oldCfgPath, exeDir, L"config\\ConEmu-%COMPUTERNAME%.xml"); | 	PathCombine(cpuCfgPath, exeDir, L"config\\ConEmu-%COMPUTERNAME%.xml"); | ||||||
| 	ExpandEnvironmentStrings(oldCfgPath, oldCfgPath, sizeof(oldCfgPath) / sizeof(oldCfgPath[0])); | 	ExpandEnvironmentStrings(cpuCfgPath, cpuCfgPath, sizeof(cpuCfgPath) / sizeof(cpuCfgPath[0])); | ||||||
| 	if (!PathFileExists(oldCfgPath)) { |  | ||||||
|  | 	// Check for user-specific config file. | ||||||
|  | 	PathCombine(userCfgPath, exeDir, L"config\\user-ConEmu.xml"); | ||||||
|  |   | ||||||
|  |   if (PathFileExists(cpuCfgPath)) { | ||||||
|  | 		PathCombine(oldCfgPath, exeDir, cpuCfgPath.GetBuffer(sizeof(cpuCfgPath))); | ||||||
|  |   } | ||||||
|  |   else if (!PathFileExists(userCfgPath)) { | ||||||
|  | 		PathCombine(oldCfgPath, exeDir, userCfgPath.GetBuffer(sizeof(userCfgPath))); | ||||||
|  |   } | ||||||
|  |   else { | ||||||
| 		PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml"); | 		PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml"); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| 	// Check for machine-specific config file. | 	// Check for machine-specific config file. | ||||||
| 	PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu-%COMPUTERNAME%.xml"); | 	PathCombine(cfgPath, exeDir, oldCfgPath.GetBufer(sizeof(oldCfgPath); | ||||||
| 	ExpandEnvironmentStrings(cfgPath, cfgPath, sizeof(cfgPath) / sizeof(cfgPath[0])); | 	// ExpandEnvironmentStrings(cfgPath, cfgPath, sizeof(cfgPath) / sizeof(cfgPath[0])); | ||||||
| 	if (!PathFileExists(cfgPath)) { | 	if (!PathFileExists(cfgPath)) { | ||||||
| 		PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml"); | 		PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml"); | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user