* When a file was created, then deleted shortly after, on a PoseView that is

busy processing other things, the file could be gone by the time we processed
  the fs notification message of the entry creation. This case wasn't handled
  properly and would cause #4130 and most certainly duplicate #4831, #4610 and
  also possibly #4271.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33744 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexandre Deckner 2009-10-23 08:07:56 +00:00
parent ddbe12007a
commit c3ce629473

View File

@ -5080,7 +5080,13 @@ BPoseView::EntryCreated(const node_ref *dirNode, const node_ref *itemNode,
// have to node monitor ahead of time because Model will
// cache up the file type and preferred app
Model *model = new Model(dirNode, itemNode, name, true);
if (model->InitCheck() != B_OK) {
if (model->InitCheck() == B_ENTRY_NOT_FOUND) {
// might happen if the file was deleted shortly after creation and we
// were too busy to create the model in time see #4130
delete model;
return NULL;
} else if (model->InitCheck() != B_OK) {
// if we have trouble setting up model then we stuff it into
// a zombie list in a half-alive state until we can properly awaken it
PRINT(("2 adding model %s to zombie list, error %s\n", model->Name(),