// Copyright (C) 2003-2009 by Object Mentor, Inc. All rights reserved.
// Released under the terms of the CPL Common Public License version 1.0.
package fitnesse.fixtures;

import util.FileUtil;

import java.io.File;

public class FileSection {
  private static File fileSection;

  public FileSection(String type) throws Exception {
    if ("setup".equals(type.toLowerCase())) {
      new File(FitnesseFixtureContext.baseDir).mkdir();
      File dir = new File(FitnesseFixtureContext.baseDir);
      dir.mkdir();
      fileSection = new File(dir, "files");
      fileSection.mkdir();
    } else {
      FileUtil.deleteFileSystemDirectory(FitnesseFixtureContext.baseDir);
      fileSection = null;
    }
  }

  public static File getFileSection() {
    return fileSection;
  }

}

@@ -377,64 +377,8 @@
 ) %7B%0A
-      new File(FitnesseFixtureContext.baseDir).mkdir();%0A
     
@@ -414,39 +414,57 @@
 eFixtureContext.
-baseDir
+context.getRootPagePath()
 );%0A      dir.mkd
@@ -621,15 +621,33 @@
 ext.
-baseDir
+context.getRootPagePath()
 );%0A 

Use correct directory for file section AT.