[desktop] Prefer folder name over zip name for zip mods

e.g. Serfrost's Defogger will now be named "Serfrosts Defogger" by
default, instead of "serfrosts_base_defogger_v2-4"

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2026-06-01 21:13:00 -04:00
parent 8fac95dcc0
commit 5ba2b06306
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
2 changed files with 3 additions and 4 deletions

View file

@ -3,7 +3,6 @@
#include <algorithm>
#include <filesystem>
#include <iostream>
#include <fmt/format.h>
#include "common/fs/fs.h"
#include "common/fs/fs_types.h"

View file

@ -33,10 +33,10 @@ QStringList GetModFolders(const QString& root, const QString& fallbackName) {
std_path = paths[0];
QString default_name;
if (!fallbackName.isEmpty())
default_name = fallbackName;
else if (!paths.empty())
if (!paths.empty())
default_name = QString::fromStdString(std_path.filename().string());
else if (!fallbackName.isEmpty())
default_name = fallbackName;
else
default_name = root.split(QLatin1Char('/')).last();