summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2010-01-11 11:05:11 +0100
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2010-01-11 11:05:11 +0100
commit31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7 (patch)
tree2529a747bcf5ff64d0eeca01f7b8f189dc03448a
parent6ead132ac90477e493e9f9cb1e3c66c1bcb91b14 (diff)
downloadcpptasks-parallel-31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7.tar.gz
cpptasks-parallel-31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7.tar.bz2
cpptasks-parallel-31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7.tar.xz
cpptasks-parallel-31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7.zip
Fixed NAR-128
-rw-r--r--README.txt1
-rw-r--r--src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java7
2 files changed, 5 insertions, 3 deletions
diff --git a/README.txt b/README.txt
index b3d53b4..0a96d88 100644
--- a/README.txt
+++ b/README.txt
@@ -10,6 +10,7 @@ Modified version of ant contrib cpptasks, used in the freehep/maven-nar-plugin.
- added .f90 as extension for the fortran compiler, see NAR-108
- merged with cpptasks-1.0b5.tar.gz
- See NAR-103 for tests that have been changed
+- [src/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker] throw buildException when absolute paths are too long, Windows only.
* cpptasks-1.0-beta-4-parallel-5
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java b/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java
index d167823..92d06ea 100644
--- a/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java
+++ b/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java
@@ -336,9 +336,10 @@ public abstract class CommandLineLinker extends AbstractLinker
*/
protected String prepareFilename(StringBuffer buf,
String outputDir, String sourceFile) {
-// FREEHEP BEGIN return relatuve path if absolute path is too long
- if (isWindows() && sourceFile.length() > 250) {
- sourceFile = CUtil.getRelativePath(outputDir, new File(sourceFile));
+// FREEHEP BEGIN exit if absolute path is too long. Max length on relative paths in windows is even shorter.
+ int maxPathLength = 250;
+ if (isWindows() && sourceFile.length() > maxPathLength) {
+ throw new BuildException("Absolute path too long, "+sourceFile.length()+" > "+maxPathLength+": '"+sourceFile);
}
// FREEHEP END
return quoteFilename(buf, sourceFile);