Tracker: Delete temporary/transient queries only in ~/queries.

Otherwise we would delete them even if they'd been copied somewhere
else on the filesystem, which sounds like a terrible idea and
not at all what I (and I expect other users) would expect.
This commit is contained in:
Augustin Cavalier
2024-10-18 13:35:45 -04:00
parent 430609181e
commit 1ffd5a3665
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -3674,11 +3674,11 @@ DeleteTransientQueriesTask::Initialize()
PRINT(("starting up transient query killer\n")); PRINT(("starting up transient query killer\n"));
BPath path; BPath path;
status_t result = find_directory(B_USER_DIRECTORY, &path, false); status_t result = find_directory(B_USER_DIRECTORY, &path, false);
if (result != B_OK) { if (result != B_OK || path.Append("queries") != B_OK) {
state = kError; state = kError;
return; return;
} }
fWalker = new BTrackerPrivate::TQueryWalker(kAttrQueryLastChange " != 0"); fWalker = new BTrackerPrivate::TNodeWalker(path.Path());
state = kAllocatedWalker; state = kAllocatedWalker;
} }
+1 -1
View File
@@ -379,7 +379,7 @@ private:
static const int32 kBatchCount = 100; static const int32 kBatchCount = 100;
static const int32 kDaysToExpire = 7; static const int32 kDaysToExpire = 7;
BTrackerPrivate::TQueryWalker* fWalker; BTrackerPrivate::TNodeWalker* fWalker;
}; };