diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2018-03-20 21:41:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-20 21:41:37 -0500 |
| commit | 3cceb6502ced53e17ef804856bd516e8537b0f46 (patch) | |
| tree | 974c1aba4d7b93429ae7a7986eaba29a93bd7c9d /src/mainwindow.cpp | |
| parent | bcc4c8d6aaab9ca4a641f7fa6b71a9f927d9bb52 (diff) | |
| parent | 92a8a3dce863c80f540537162e7c7e415cdfd57d (diff) | |
Merge pull request #280 from Al12rs/Develop
Fixed preview "file not found" error if the mod folder containing theā¦
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 4 |
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 {
|
