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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user