Skip to content

Commit

Permalink
fixing scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
julianh2o committed Dec 6, 2014
1 parent 5aba524 commit 6abcf31
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/jobs/FixMissingFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ public void doJob() throws Exception {
Stopwatch sw = new Stopwatch();
List<Long> pviDeleteList = new LinkedList<>();
List<Long> imageDeleteList = new LinkedList<>();
int found = 0;
int notFound = 0;
for (DatabaseImage img : images) {
sw.start("all");
est.tick();
boolean pathExists = existingPaths.contains(img.getStringPath());
if (!pathExists) {
found ++;
notFound ++;
boolean isDirectory = img.getPath().toFile().isDirectory();
if (isDirectory) {
directories++;
Expand All @@ -87,7 +87,7 @@ public void doJob() throws Exception {
sw.stop("all");
}

System.out.println("found: "+found+" of "+images.size());
System.out.println("missing: "+notFound+" of "+images.size());

StringBuilder sql = new StringBuilder();
int index = 0;
Expand Down Expand Up @@ -134,7 +134,6 @@ private static HashSet<String> getAllFiles(Path root) throws IOException {
Files.walkFileTree(root,EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new SimpleFileVisitor<Path>() {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
System.out.println(PathService.getRelativeString(file));
paths.add(PathService.getRelativeString(file));
return FileVisitResult.CONTINUE;
}
Expand Down

0 comments on commit 6abcf31

Please sign in to comment.