You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (PathFileExists(cpuCfgPath)) // config/ConEmu-%COMPUTERNAME%.xml file exists, use it.
220
+
{
221
+
if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml file exists, copy vendor/conemu-maximus5/ConEmu.xml to config/ConEmu-%COMPUTERNAME%.xml.
222
+
{
198
223
if (!CopyFile(cfgPath, cpuCfgPath, FALSE))
199
224
{
200
225
MessageBox(NULL,
201
226
(GetLastError() == ERROR_ACCESS_DENIED)
202
-
? L"Failed to copy ConEmu.xml file to ConEmu-%COMPUTERNAME%.xml backup location! Restart Cmder as Administrator."
203
-
: L"Failed to copy ConEmu.xml file to ConEmu-%COMPUTERNAME%.xml backup location!", MB_TITLE, MB_ICONSTOP);
227
+
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied."
228
+
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP);
204
229
exit(1);
205
230
}
206
231
}
207
-
else
232
+
else// vendor/conemu-maximus5/ConEmu.xml config file does not exist, copy config/ConEmu-%COMPUTERNAME%.xml to vendor/conemu-maximus5/ConEmu.xml file
208
233
{
209
234
if (!CopyFile(cpuCfgPath, cfgPath, FALSE))
210
235
{
211
236
MessageBox(NULL,
212
237
(GetLastError() == ERROR_ACCESS_DENIED)
213
-
? L"Failed to copy ConEmu-%COMPUTERNAME%.xml file to vendored ConEmu.xml location! Restart Cmder as Administrator."
214
-
: L"Failed to copy ConEmu-%COMPUTERNAME%.xml file to vendored ConEmu.xml location!", MB_TITLE, MB_ICONSTOP);
238
+
? L"Failed to copy conig/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
239
+
: L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
215
240
exit(1);
216
241
}
217
242
}
218
243
}
219
-
elseif (PathFileExists(userCfgPath)) {
220
-
if (PathFileExists(cfgPath)) {
244
+
elseif (PathFileExists(userCfgPath)) // config/user_conemu.xml exists, use it.
245
+
{
246
+
if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml.
247
+
{
221
248
if (!CopyFile(cfgPath, userCfgPath, FALSE))
222
249
{
223
250
MessageBox(NULL,
224
251
(GetLastError() == ERROR_ACCESS_DENIED)
225
-
? L"Failed to copy ConEmu.xml file to backup location! Restart Cmder as Administrator."
226
-
: L"Failed to copy ConEmu.xml file to backup location!", MB_TITLE, MB_ICONSTOP);
252
+
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied."
253
+
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
227
254
exit(1);
228
255
}
229
256
}
230
-
else
257
+
else// vendor/conemu-maximus5/ConEmu.xml does not exist, copy config/user-conemu.xml to vendor/conemu-maximus5/ConEmu.xml
231
258
{
232
259
if (!CopyFile(userCfgPath, cfgPath, FALSE))
233
260
{
234
261
MessageBox(NULL,
235
262
(GetLastError() == ERROR_ACCESS_DENIED)
236
-
? L"Failed to copy ConEmu.xml file to vendored ConEmu.xml location! Restart Cmder as Administrator."
237
-
: L"Failed to copy ConEmu.xml file to vendored ConEmu.xml location!", MB_TITLE, MB_ICONSTOP);
263
+
? L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
264
+
: L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
238
265
exit(1);
239
266
}
240
267
}
241
268
}
242
-
elseif (PathFileExists(cfgPath)) {
269
+
elseif (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml
270
+
{
243
271
if (!CopyFile(cfgPath, userCfgPath, FALSE))
244
272
{
245
273
MessageBox(NULL,
246
274
(GetLastError() == ERROR_ACCESS_DENIED)
247
-
? L"Failed to copy ConEmu.xml file to user-conemu.xml backup location! Restart Cmder as Administrator."
248
-
: L"Failed to copy ConEmu.xml file to user-conemu.xml backup location!", MB_TITLE, MB_ICONSTOP);
275
+
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied."
276
+
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
249
277
exit(1);
250
278
}
251
279
}
252
-
else {
253
-
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
280
+
else// vendor/ConEmu.xml config exists, copy Cmder vendor/ConEmu.xml file to vendor/conemu-maximus5/ConEmu.xml.
0 commit comments