Tracker refresh view after a directory's been locked


In my experimentations around BeAPI, I stumbled upon what looks like a bug.

The intent is, in a same process, to create files in a directory that has been locked.

So far, the files are created (you can access them and list them), but the Tracker view of the directory isn’t properly updated. Only the last written file may be displayed.

I wrote a small program to narrow down the behaviour.
The Makefile expose a bug target you can use to automatically launch the example.

Did I miss something? Or is it really a bug of the Tracker?

I didn’t dig in the FS listening features of the BeAPI if any, but if it exists and is used by the tracker, I guess it’s done through BMessage. Maybe only the last added file is present in the list because the BMessage::AddString index stays zero (mistake? compiler optimisation requiring volatile?).


1 Like

If the files show up after closing and reopening the Tracker window, then it’s definitely a bug (but it may be one somewhere other than Tracker, without investigating I don’t know.) Please open a ticket.

You didn’t miss anything, it really is a bug in Tracker. The same thing happens when you create new folders in a directory. They get created on top of each other.

1 Like

Ok, I’m scanning the open issues to see if there is similar cases so to avoid duplication. May take me a while :sweat_smile: