diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-14 15:40:33 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-14 15:40:33 -0600 |
| commit | 6410929e17d642618f284d5c97d457f1ac653e6e (patch) | |
| tree | 5c0ee09e04f38a2dd70f1734d25c74e0b8ae5d43 /libs/uibase/src/utility.cpp | |
| parent | 817e8f5cd26739c69d930d21cd9dc4c0b6e4984e (diff) | |
Migrate data paths to ~/.local/share/fluorine/, add native build, fix %command% and system Proton scanning
- All data paths migrated from ~/.var/app/com.fluorine.manager/ to
~/.local/share/fluorine/ so native and Flatpak builds share the same
instances, plugins, and configs
- New fluorinepaths.h/.cpp with fluorineDataDir() helper and one-time
migration from old path (writes MOVED.txt breadcrumb)
- New libs/nak/src/paths.rs as Rust equivalent (data_dir())
- Strip %command% tokens from launch wrapper in protonlauncher.cpp
- Always scan /usr/share/steam/compatibilitytools.d/ for system Proton
packages (Arch installs Proton there); add Flatpak filesystem permission
- Native build (build-native.sh) installs to ~/.local/share/fluorine/
with desktop entry and ~/.local/bin symlink instead of portable zip
- build-flatpak.sh wrapper for Flatpak builds
- Fix container locale (LANG=C.UTF-8) for AutoUic warnings
- Fix prefixExists() to handle both compatdata and pfx directory layouts
- Fix globalInstancesRootPath() to use fluorineDataDir() on Linux
- Fix umu-run Flatpak lookup to use fluorineDataDir()
- Update README with build instructions and Arch dependency list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/uibase/src/utility.cpp')
| -rw-r--r-- | libs/uibase/src/utility.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libs/uibase/src/utility.cpp b/libs/uibase/src/utility.cpp index 0ad64ad..e6f53b8 100644 --- a/libs/uibase/src/utility.cpp +++ b/libs/uibase/src/utility.cpp @@ -64,7 +64,17 @@ bool removeDir(const QString& dirName) dir.entryInfoList(QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | QDir::AllDirs | QDir::Files, QDir::DirsFirst)) { - if (info.isDir()) { + // Never recurse into symlinked directories: in Flatpak they can point to + // read-only runtime locations (e.g. /app), and we only want to remove the link. + if (info.isSymLink()) { + QFile file(info.absoluteFilePath()); + if (!file.remove()) { + reportError(QObject::tr("removal of \"%1\" failed: %2") + .arg(info.absoluteFilePath()) + .arg(file.errorString())); + return false; + } + } else if (info.isDir()) { if (!removeDir(info.absoluteFilePath())) { return false; } @@ -209,7 +219,11 @@ static bool shellOpDelete(const QStringList& fileNames, bool recycle) // On Linux, "recycle" moves to trash using Qt; otherwise just delete for (const auto& fileName : fileNames) { QFileInfo fi(fileName); - if (fi.isDir()) { + if (fi.isSymLink()) { + if (!QFile::remove(fileName)) { + return false; + } + } else if (fi.isDir()) { if (!removeDir(fileName)) { return false; } |
