1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-02-19 21:54:50 +01:00
soloturn 2021-03-20 10:10:09 +01:00
parent 28cee940b0
commit d2e248cb61

View File

@ -1183,13 +1183,15 @@ public final class MainWindow implements Runnable, RipStatusHandler {
// Guess rip history based on rip folder
String[] dirs = Utils.getWorkingDirectory()
.list((dir, file) -> new File(dir.getAbsolutePath() + File.separator + file).isDirectory());
for (String dir : dirs) {
String url = RipUtils.urlFromDirectoryName(dir);
if (url != null) {
// We found one, add it to history
HistoryEntry entry = new HistoryEntry();
entry.url = url;
HISTORY.add(entry);
if (dirs != null) {
for (String dir : dirs) {
String url = RipUtils.urlFromDirectoryName(dir);
if (url != null) {
// We found one, add it to history
HistoryEntry entry = new HistoryEntry();
entry.url = url;
HISTORY.add(entry);
}
}
}
}