From e015effb475af12d4c6627b9c3d1f9be215f6b2b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 6 Dec 2013 12:03:12 -0800 Subject: Don't change working directory when looking for tranlations And only replace 'bin' if there is a bin in the path... Signed-off-by: Dirk Hohndel --- qt-gui.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'qt-gui.cpp') diff --git a/qt-gui.cpp b/qt-gui.cpp index 04c5bc17a..0b80bb557 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -403,10 +403,11 @@ QString getSubsurfaceDataPath(QString folderToFind) // next check for the Linux typical $(prefix)/share/subsurface execdir = QCoreApplication::applicationDirPath(); - folder = QDir(execdir.replace("bin", "share/subsurface/").append(folderToFind)); - if (folder.exists()) - return folder.absolutePath(); - + if (execdir.contains("bin")) { + folder = QDir(execdir.replace("bin", "share/subsurface/").append(folderToFind)); + if (folder.exists()) + return folder.absolutePath(); + } // then look for the usual location on a Mac execdir = QCoreApplication::applicationDirPath(); folder = QDir(execdir.append("/../Resources/share/").append(folderToFind)); -- cgit v1.2.3-70-g09d2