diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2010-01-11 11:05:11 +0100 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2010-01-11 11:05:11 +0100 |
commit | 31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7 (patch) | |
tree | 2529a747bcf5ff64d0eeca01f7b8f189dc03448a /src | |
parent | 6ead132ac90477e493e9f9cb1e3c66c1bcb91b14 (diff) | |
download | cpptasks-parallel-31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7.tar.gz cpptasks-parallel-31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7.tar.bz2 cpptasks-parallel-31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7.tar.xz cpptasks-parallel-31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7.zip |
Fixed NAR-128
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java | 7 |
1 files changed, 4 insertions, 3 deletions
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); |