aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/qtlibspatcher
diff options
context:
space:
mode:
authorgoro <[email protected]>2009-01-29 17:24:15 +0100
committergoro <[email protected]>2009-01-29 17:25:32 +0100
commitbdc0d42e99fee8388dbad737ee673889842d663b (patch)
treeacaf1b600abcf239b32b9182740e2156479665cf /src/tools/qtlibspatcher
parentfc67b0437a7581cb9d3ff5d1b4ba2069155eec28 (diff)
Make patcher not abort on errors
Diffstat (limited to 'src/tools/qtlibspatcher')
-rw-r--r--src/tools/qtlibspatcher/qtlibspatchermain.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/tools/qtlibspatcher/qtlibspatchermain.cpp b/src/tools/qtlibspatcher/qtlibspatchermain.cpp
index c3ff6a0387e..4fba6a025c1 100644
--- a/src/tools/qtlibspatcher/qtlibspatchermain.cpp
+++ b/src/tools/qtlibspatcher/qtlibspatchermain.cpp
@@ -85,13 +85,13 @@ bool patchBinaryWithQtPathes(const char *fileName, const char *baseQtPath)
logFileName(fileName);
for (int i = 0; i < (int)(sizeof(variables) / sizeof(variables[0])); i++) {
- const char * const newStr = allocFileNameCopyAppend(variables[i].variable, baseQtPath, variables[i].subDirectory);
+ const char * const newStr = allocFileNameCopyAppend(
+ variables[i].variable, baseQtPath, variables[i].subDirectory);
BinPatch binFile(fileName);
const bool success = binFile.patch(variables[i].variable, newStr);
delete[] newStr;
if (!success) {
result = false;
- break;
}
}
@@ -119,7 +119,6 @@ bool patchBinariesWithQtPathes(const char *baseQtPath)
delete[] fileName;
if (!success) {
result = false;
- break;
}
}
@@ -602,9 +601,6 @@ bool patchDebugLibrariesWithQtPath(const char *baseQtPath)
delete[] fileName;
delete[] oldSourcePath;
delete[] newSourcePath;
-
- if (!result)
- break;
}
return result;
@@ -774,8 +770,8 @@ int main(int argc, char *args[])
break;
patchTextFiles(baseQtPath);
- const bool success = patchBinariesWithQtPathes(baseQtPath)
- && patchDebugLibrariesWithQtPath(baseQtPath);
+ const bool successOne = patchBinariesWithQtPathes(baseQtPath);
+ const bool successTwo = patchDebugLibrariesWithQtPath(baseQtPath);
delete[] baseQtPath;
- return success ? 0 : 1;
+ return (successOne && successTwo) ? 0 : 1;
}