Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request Praqma#1 from asmodehn/master
[JENKINS-20141] Fix for path issues
  • Loading branch information
MadsNielsen committed Nov 7, 2013
2 parents 9814182 + f8e9549 commit c2ace3f
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -19,6 +19,7 @@
import hudson.model.BuildListener;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;
import java.io.File;

public class DrMemoryBuilder extends Builder {

Expand All @@ -37,6 +38,7 @@ public DrMemoryBuilder( String executable, String arguments, String logPath ) {
this.logPath = logPath;
}

@Override
public boolean perform( AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener ) throws InterruptedException {
PrintStream out = listener.getLogger();
//DrMemory.enableLogging();
Expand All @@ -49,7 +51,7 @@ public boolean perform( AbstractBuild<?, ?> build, Launcher launcher, BuildListe
out.println( "Dr Memory Plugin version " + version );

try {
finalLogPath = logPath += ( logPath.endsWith( "/" ) ? "" : ( logPath.endsWith( "\\" ) ? "" : "/" ) );
finalLogPath = logPath += ( logPath.endsWith( File.separator ) ? "" : File.separator );
finalLogPath += build.getNumber();
build.getWorkspace().act( new DrMemoryRemoteBuilder( executable, arguments, finalLogPath, listener ) );
return true;
Expand Down

0 comments on commit c2ace3f

Please sign in to comment.