From 31a2863c1a9a5e8960c6a61a0b26e6c1a3d3b0f7 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Mon, 11 Jan 2010 11:05:11 +0100 Subject: Fixed NAR-128 --- .../net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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); -- cgit v1.2.3