From 6ead132ac90477e493e9f9cb1e3c66c1bcb91b14 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Fri, 8 Jan 2010 15:54:21 +0100 Subject: Trying to debug NAR-128 --- .../sf/antcontrib/cpptasks/compiler/CommandLineLinker.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/net/sf') 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 2dde1a0..d167823 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/compiler/CommandLineLinker.java @@ -33,6 +33,7 @@ import net.sf.antcontrib.cpptasks.TargetDef; import net.sf.antcontrib.cpptasks.VersionInfo; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.taskdefs.condition.Os; import org.apache.tools.ant.types.Environment; @@ -335,12 +336,11 @@ public abstract class CommandLineLinker extends AbstractLinker */ protected String prepareFilename(StringBuffer buf, String outputDir, String sourceFile) { - String relativePath = CUtil.getRelativePath(outputDir, - new File(sourceFile)); -// FREEHEP, return the shortest -// return quoteFilename(buf, sourceFile.length() > relativePath.length() ? relativePath : sourceFile); -// FREEHEP trying with always absolute paths, as Windows relPaths have a tighter restriction on length than absPaths... - System.err.println(sourceFile.length()+" "+relativePath.length()+" "+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 END return quoteFilename(buf, sourceFile); } -- cgit v1.2.3