Skip to content

Commit

Permalink
Google Chrome Cache Parser #1568
Browse files Browse the repository at this point in the history
BUGFIX - If there are two files with the same name, the parser could
show the wrong file. Now the file is fetched based on the name and id
contained in the URL.
  • Loading branch information
felipecampanini committed May 19, 2023
1 parent 1af9f39 commit 902326d
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.io.InputStream;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -172,8 +171,7 @@ public void parse(InputStream indexFile, ContentHandler handler, Metadata metada

// Checking attachments image
for (DiscordAttachment att : dr.getAttachments()) {
if (ce2.getRequestURL().contains(att.getFilename())
&& !ce2.getName().contains("data")) {
if (ce2.getRequestURL().contains(att.getUrl().split("https://cdn.discordapp.com/attachments/")[1])) {
for (IItemReader ib : externalFiles) {
if (ib.getName() != null && ib.getName().equals(ce2.getName())) {
att.setMediaHash(ib.getHash());
Expand Down

0 comments on commit 902326d

Please sign in to comment.