summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/processrunner.cpp12
-rw-r--r--src/version.rc6
2 files changed, 11 insertions, 7 deletions
diff --git a/src/processrunner.cpp b/src/processrunner.cpp
index 3ea40da2..97b5c580 100644
--- a/src/processrunner.cpp
+++ b/src/processrunner.cpp
@@ -19,12 +19,16 @@ void adjustForVirtualized(
// "environment" with the appropriate paths fixed:
// (i.e. mods\FNIS\path\exe => game\data\path\exe)
QString cwdPath = sp.currentDirectory.absolutePath();
- bool virtualizedCwd = cwdPath.startsWith(modsPath, Qt::CaseInsensitive);
+ QString trailedModsPath = modsPath;
+ if (!trailedModsPath.endsWith('/')) {
+ trailedModsPath = trailedModsPath + '/';
+ }
+ bool virtualizedCwd = cwdPath.startsWith(trailedModsPath, Qt::CaseInsensitive);
QString binPath = sp.binary.absoluteFilePath();
- bool virtualizedBin = binPath.startsWith(modsPath, Qt::CaseInsensitive);
+ bool virtualizedBin = binPath.startsWith(trailedModsPath, Qt::CaseInsensitive);
if (virtualizedCwd || virtualizedBin) {
if (virtualizedCwd) {
- int cwdOffset = cwdPath.indexOf('/', modsPath.length() + 1);
+ int cwdOffset = cwdPath.indexOf('/', trailedModsPath.length());
QString adjustedCwd = cwdPath.mid(cwdOffset, -1);
cwdPath = game->dataDirectory().absolutePath();
if (cwdOffset >= 0)
@@ -33,7 +37,7 @@ void adjustForVirtualized(
}
if (virtualizedBin) {
- int binOffset = binPath.indexOf('/', modsPath.length() + 1);
+ int binOffset = binPath.indexOf('/', trailedModsPath.length());
QString adjustedBin = binPath.mid(binOffset, -1);
binPath = game->dataDirectory().absolutePath();
if (binOffset >= 0)
diff --git a/src/version.rc b/src/version.rc
index 8e2000ed..7e62e114 100644
--- a/src/version.rc
+++ b/src/version.rc
@@ -3,14 +3,14 @@
// If VS_FF_PRERELEASE is not set, MO labels the build as a release and uses VER_FILEVERSION to determine version number.
// Otherwise, if letters are used in VER_FILEVERSION_STR, uses the full MOBase::VersionInfo parser
// Otherwise, uses the numbers from VER_FILEVERSION and sets the release type as pre-alpha
-#define VER_FILEVERSION 2,3,1
-#define VER_FILEVERSION_STR "2.3.1\0"
+#define VER_FILEVERSION 2,4,0
+#define VER_FILEVERSION_STR "2.4.0alpha0\0"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILEVERSION
PRODUCTVERSION VER_FILEVERSION
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-FILEFLAGS (0)
+FILEFLAGS VS_FF_PRERELEASE
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE (0)