summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index e562b2f2..e5eacc41 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -3938,7 +3938,9 @@ void MainWindow::previewDataFile()
// check if the file comes from the actual data folder instead of a mod
QDir gameDirectory = m_OrganizerCore.managedGame()->dataDirectory().absolutePath();
QString relativePath = gameDirectory.relativeFilePath(fileName);
- if (!relativePath.startsWith("..")) {
+ QDir direRelativePath = gameDirectory.relativeFilePath(fileName);
+ // if the file is on a different drive the dirRelativePath will actually be an absolute path so we make sure that is not the case
+ if (!direRelativePath.isAbsolute() && !relativePath.startsWith("..")) {
fileName = relativePath;
}
else {