Delete empty Cheeby subdirectories

This commit is contained in:
4pr0n 2015-01-11 15:20:01 -08:00
parent dc7762c327
commit 72f1864e4e

View File

@ -1,5 +1,6 @@
package com.rarchives.ripme.ripper.rippers;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
@ -153,6 +154,18 @@ public class CheebyRipper extends AbstractHTMLRipper {
getThreadPool().waitForThreads();
}
waitForThreads();
// Delete empty subdirectories
for (String prefix : albumSets.keySet()) {
if (prefix.trim().equals("")) {
continue;
}
File f = new File(this.workingDir, prefix);
if (f.list() != null && f.list().length == 0) {
logger.info("Deleting empty directory: " + f.getAbsolutePath());
f.delete();
}
}
}
private class Image {