Skip to content

Commit 12a7f85

Browse files
committed
htmlDown: do not save same file
1 parent 2369a13 commit 12a7f85

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/net/cofcool/sourcebox/internal/HtmlDownloader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.apache.commons.io.FileUtils;
3535
import org.apache.commons.io.FilenameUtils;
3636
import org.apache.commons.io.IOUtils;
37-
import org.apache.commons.lang3.RandomStringUtils;
3837
import org.apache.commons.lang3.StringUtils;
3938
import org.jsoup.Connection;
4039
import org.jsoup.Connection.Method;
@@ -273,7 +272,7 @@ enum OutputType {
273272
html((d, f, t) -> {
274273
File file = Paths.get(f, t + ".html").toFile();
275274
if (file.exists()) {
276-
file = Paths.get(f, t + RandomStringUtils.randomNumeric(2) + ".html").toFile();
275+
return;
277276
}
278277
FileUtils.writeStringToFile(file, d.outerHtml(), StandardCharsets.UTF_8);
279278
}),

0 commit comments

Comments
 (0)