Handle moving of job file correctly.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1596 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer 2002-10-22 15:57:55 +00:00
parent 4e776836cd
commit aba0d179c7
1 changed files with 11 additions and 0 deletions

View File

@ -233,11 +233,22 @@ void Folder::AttributeChanged(BMessage* msg) {
}
void Folder::HandleNodeMonitorMessage(BMessage* msg) {
ino_t node; node_ref ref;
BAutolock lock(gLock);
if (!lock.IsLocked()) return;
int32 opcode;
if (msg->FindInt32("opcode", &opcode) != B_OK) return;
switch (opcode) {
case B_ENTRY_MOVED:
fSpoolDir.GetNodeRef(&ref);
if (msg->FindInt64("to directory", &node) == B_OK &&
ref.node == node) {
EntryCreated(msg);
} else if (msg->FindInt64("from directory", &node) == B_OK &&
ref.node == node) {
EntryRemoved(msg);
}
break;
case B_ENTRY_CREATED: // add to fJobs
EntryCreated(msg);
break;