mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
fix literal attr loading and saving
This commit is contained in:
parent
05785a1175
commit
6dd655941d
@ -274,8 +274,8 @@ public class KeywordSearchListsXML {
|
|||||||
|
|
||||||
for (Keyword keyword : keywords) {
|
for (Keyword keyword : keywords) {
|
||||||
Element keywordEl = doc.createElement(KEYWORD_EL);
|
Element keywordEl = doc.createElement(KEYWORD_EL);
|
||||||
String regex = keyword.isLiteral()==false?"true":"false";
|
String literal = keyword.isLiteral()?"true":"false";
|
||||||
keywordEl.setAttribute(KEYWORD_LITERAL_ATTR, regex);
|
keywordEl.setAttribute(KEYWORD_LITERAL_ATTR, literal);
|
||||||
keywordEl.setTextContent(keyword.getQuery());
|
keywordEl.setTextContent(keyword.getQuery());
|
||||||
listEl.appendChild(keywordEl);
|
listEl.appendChild(keywordEl);
|
||||||
}
|
}
|
||||||
@ -321,9 +321,9 @@ public class KeywordSearchListsXML {
|
|||||||
final int numKeywords = wordsNList.getLength();
|
final int numKeywords = wordsNList.getLength();
|
||||||
for (int j = 0; j < numKeywords; ++j) {
|
for (int j = 0; j < numKeywords; ++j) {
|
||||||
Element wordEl = (Element) wordsNList.item(j);
|
Element wordEl = (Element) wordsNList.item(j);
|
||||||
String regex = wordEl.getAttribute(KEYWORD_LITERAL_ATTR);
|
String literal = wordEl.getAttribute(KEYWORD_LITERAL_ATTR);
|
||||||
boolean isRegex = regex.equals("true");
|
boolean isLiteral = literal.equals("true");
|
||||||
words.add(new Keyword(wordEl.getTextContent(), isRegex));
|
words.add(new Keyword(wordEl.getTextContent(), isLiteral));
|
||||||
|
|
||||||
}
|
}
|
||||||
theLists.put(name, list);
|
theLists.put(name, list);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user