[desktop] Fix 2 mod manager bugs (#3884)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run

- Multi-import would show duplicates of a mod if it had both exefs and
  romfs
- Import from folder would crash on some single mods

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3884
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
crueter 2026-04-26 03:26:04 +02:00
parent 048d02e5b4
commit 91058d7383
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
4 changed files with 13 additions and 8 deletions

View file

@ -101,8 +101,10 @@ QStringList GetModFolders(const QString& root, const QString& fallbackName) {
} else {
// Rename the existing mod folder.
const auto new_path = std_path.parent_path() / name.toStdString();
fs::remove_all(new_path);
fs::rename(std_path, new_path);
if (new_path != std_path) {
fs::remove_all(new_path);
fs::rename(std_path, new_path);
}
std_path = new_path;
}