Skip to content

Commit

Permalink
Provide root path as directory
Browse files Browse the repository at this point in the history
  • Loading branch information
oblivioncth committed Nov 12, 2023
1 parent 9c0def9 commit c903a9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/include/fp/fp-install.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ enum class Edition {Ultimate, Infinity, Core};
Daemon outfittedDaemon() const;

// Data access
QString fullPath() const;
QDir dir() const;
QDir entryLogosDirectory() const;
QDir entryScreenshotsDirectory() const;
QDir extrasDirectory() const;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/fp-install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const Services& Install::services() const { return mServices; }
const Execs& Install::execs() const { return mExecs; }
Daemon Install::outfittedDaemon() const { return mDaemon; }

QString Install::fullPath() const { return mRootDirectory.absolutePath(); }
QDir Install::dir() const { return mRootDirectory; }
QDir Install::entryLogosDirectory() const { return mEntryLogosDirectory; }
QDir Install::entryScreenshotsDirectory() const { return mEntryScreenshotsDirectory; }
QDir Install::extrasDirectory() const { return mExtrasDirectory; }
Expand Down
4 changes: 2 additions & 2 deletions lib/src/fp-toolkit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Toolkit::Toolkit(const Install& install, const Key&) :
mEntryRemoteLogoTemplate += IMAGE_COMPRESSED_URL_SUFFIX;
mEntryRemoteScreenshotTemplate += IMAGE_COMPRESSED_URL_SUFFIX;
}
mDatapackLocalDir = mInstall.fullPath() + '/' + mInstall.preferences().dataPacksFolderPath;
mDatapackLocalDir = mInstall.mRootDirectory.absoluteFilePath(mInstall.preferences().dataPacksFolderPath);
Q_ASSERT(mInstall.preferences().gameDataSources.contains(mInstall.MAIN_DATAPACK_SOURCE));
mDatapackRemoteBase = mInstall.preferences().gameDataSources.value(mInstall.MAIN_DATAPACK_SOURCE).arguments.value(0);
if(mDatapackRemoteBase.back() == '/')
Expand Down Expand Up @@ -152,7 +152,7 @@ bool Toolkit::resolveExecSwaps(QString& appPath, const QString& platform) const
bool Toolkit::resolveTrueAppPath(QString& appPath, const QString& platform, QHash<QString, QString> overrides, bool absolute) const
{
// If appPath is absolute, convert it to relative temporarily
QString fpPath = mInstall.fullPath();
QString fpPath = mInstall.mRootDirectory.absolutePath();
bool isFpAbsolute = appPath.startsWith(fpPath);
if(isFpAbsolute)
{
Expand Down

0 comments on commit c903a9e

Please sign in to comment.