cmderdev / cmder

Lovely console emulator package for Windows
https://cmder.app
MIT License
25.86k stars 2.03k forks source link

Development BUG - Fixes launcher overwriting or not backing up terminal emulator settings in development branch. #2945

Open daxgames opened 4 months ago

daxgames commented 4 months ago

Added below after comparing to working code in master:

Note: Line numbers are from the PR Code not the original code

297 if (PathFileExists(cfgPath))
298 {
299-338 indent <original code>
339 }

Removed code below after comparing to working code in master:

Note: Line numbers are from the PR Code not the original code

293 <original code> **wcscmp(cpuCfgPath, L"") == 0 &&** <original code>
338 <original code> **wcscmp(userCfgPath, L"") == 0 &&** <original code>
443 <original code> **wcscmp(cfgPath, L"") == 0 &&** <original code>

Everything else is a comment or a { bracket line change

daxgames commented 4 months ago

I have tested this code and it works using the following reproduction steps:

How to validate the fix.

  1. Download and extract conemu and windows terminal artifacts built by this PR.
  2. Run cmder.exe for each artifact is being tested
  3. Validate default tasks/profiles are present.
  4. Edit/Add a profile/task in Windows Terminal or ConEmu depending which artifact is being tested
  5. Close Windows Terminal or ConEmu depending which artifact is being tested
  6. Run cmder.exe for each artifact is being tested
  7. Profile Edits/Adds are still present.
  8. Exit ConEmu /Windows Terminal depending which artifact is being tested
  9. Delete Terminal emulator settings files for conemu(conemu.xml) and windows terminal(settings.json)
  10. Run cmder.exe for each artifact is being tested
  11. Validate your edited tasks/profiles are present
daxgames commented 1 month ago

This is ready to commit.