for (int i = 0; i < sourcerootFiles.length; i++) {
FileUtil.deleteContents(sourcerootFiles[i], pickIncFiles, false);
}
+ if (0 < sourcerootFiles.length) {
+ FileUtil.sleepPastFinalModifiedTime(sourcerootFiles);
+ }
+ }
+ File[] files = FileUtil.getBaseDirFiles(sandbox.stagingDir, srcPaths);
+ if (0 < files.length) {
+ FileUtil.sleepPastFinalModifiedTime(files);
}
} catch (IllegalArgumentException e) {
validator.fail("staging - bad input", e);
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
+import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
int numDeletes;
int numFails;
}
+ // sigh - delay until after last last-mod-time
+ final ArrayList copied = new ArrayList();
final intHolder holder = new intHolder();
FileFilter deleteOrCount = new FileFilter() {
final String clip = ".delete" + toSuffix;
if (!path.endsWith(clip)) {
holder.numCopies++;
validator.info("copying file: " + path);
+ copied.add(file);
} else {
doCopy = false;
path = path.substring(0, path.length()-clip.length()) + toSuffix;
} else {
result = (0 == holder.numFails);
}
+ if (0 < copied.size()) {
+ File[] files = (File[]) copied.toArray(new File[0]);
+ FileUtil.sleepPastFinalModifiedTime(files);
+ }
} catch (NullPointerException npe) {
validator.fail("staging - input", npe);
} catch (IOException e) {