Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: HaikuArchives/Filer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8992fe615495
Choose a base ref
...
head repository: HaikuArchives/Filer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1e7ff10b47b7
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 4, 2021

  1. Fix saving/loading of attribute tests

    Rather than saving an attribute rule's associated mimetype in db column
    "attrtype," save the target attribute's internal name (e.g., MAIL:To).
    JadedCtrl authored and humdinger committed Nov 4, 2021
    Copy the full SHA
    1e7ff10 View commit details
Showing with 4 additions and 4 deletions.
  1. +4 −4 sources/RuleRunner.cpp
8 changes: 4 additions & 4 deletions sources/RuleRunner.cpp
Original file line number Diff line number Diff line change
@@ -1140,14 +1140,14 @@ SaveRules(const BObjectList<FilerRule>* ruleList)
if (!test)
continue;

BString value, mimeType, typeName, attrName;
BString value, attrType, typeName, attrName;
int8 type, modetype;
type = modetype = 0;

test->FindInt8("name", &type);
test->FindInt8("mode", &modetype);
test->FindString("value", &value);
test->FindString("mimetype", &mimeType);
test->FindString("attrtype", &attrType);
test->FindString("typename", &typeName);
test->FindString("attrname", &attrName);

@@ -1158,7 +1158,7 @@ SaveRules(const BObjectList<FilerRule>* ruleList)
command = "insert into ";
command << tablename << " values('test', " << type << ", "
<< modetype << ", '" << EscapeIllegalCharacters(value.String())
<< "', '" << EscapeIllegalCharacters(mimeType.String())
<< "', '" << EscapeIllegalCharacters(attrType.String())
<< "', '" << EscapeIllegalCharacters(typeName.String())
<< "', '" << EscapeIllegalCharacters(attrName.String())
<< "', " << unit << ");";
@@ -1283,7 +1283,7 @@ LoadRules(BObjectList<FilerRule>* ruleList)
test->AddInt8("name", type);

if (type == TEST_ATTRIBUTE) {
test->AddString("mimetype",
test->AddString("attrtype",
DeescapeIllegalCharacters(query.getStringField(4)));
test->AddString("typename",
DeescapeIllegalCharacters(query.getStringField(5)));