File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -752,10 +752,12 @@ void changeIdentification(const QString &id, const QString &binaryPath)
752
752
// FIXME: Split along ":" characters, check each one, only append to LD_LIBRARY_PATH if not already there
753
753
QProcessEnvironment env = QProcessEnvironment::systemEnvironment ();
754
754
QString oldPath = env.value (" LD_LIBRARY_PATH" );
755
- QString newPath = oldRpath + " :" + oldPath; // FIXME: If we use a ldd replacement, we still need to observe this path
756
- // FIXME: Directory layout might be different for system Qt; cannot assume lib/ to always be inside the Qt directory
757
- LogDebug () << " Added to LD_LIBRARY_PATH:" << newPath;
758
- setenv (" LD_LIBRARY_PATH" ,newPath.toUtf8 ().constData (),1 );
755
+ if (not oldPath.contains (oldRpath)){
756
+ QString newPath = oldRpath + " :" + oldPath; // FIXME: If we use a ldd replacement, we still need to observe this path
757
+ // FIXME: Directory layout might be different for system Qt; cannot assume lib/ to always be inside the Qt directory
758
+ LogDebug () << " Added to LD_LIBRARY_PATH:" << newPath;
759
+ setenv (" LD_LIBRARY_PATH" ,newPath.toUtf8 ().constData (),1 );
760
+ }
759
761
}
760
762
LogNormal () << " Changing rpath in" << binaryPath << " to" << id;
761
763
runPatchelf (QStringList () << " --set-rpath" << id << binaryPath);
You can’t perform that action at this time.
0 commit comments