diff options
-rw-r--r-- | share/qbs/modules/cpp/LinuxGCC.qbs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/share/qbs/modules/cpp/LinuxGCC.qbs b/share/qbs/modules/cpp/LinuxGCC.qbs index 371e519dc..6af648c40 100644 --- a/share/qbs/modules/cpp/LinuxGCC.qbs +++ b/share/qbs/modules/cpp/LinuxGCC.qbs @@ -54,8 +54,12 @@ UnixGCC { var line; do { line = ldconfig.readLine(); - if (line.charAt(0) === '/') - paths.push(line.slice(0, line.length - 1)); + if (line.charAt(0) === '/') { + var colonIndex = line.indexOf(':'); + if (colonIndex == -1) + continue; + paths.push(line.slice(0, colonIndex)); + } } while (line && line.length > 0) found = true; systemRunPaths = paths; |