[haiku-development] Re: fixing ticket #5335

  • From: Joseph Groover <looncraz@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 18 Mar 2012 15:22:53 -0500

On 3/18/2012 13:54, Abhinandan Ramprasath wrote:
I thought of fixing this bug by creating a folder id/key and assign it to each folder so that each one will be represented uniquely. The list of assigned ids/keys can be stored on a file/databse to make sure that it is never assigned again. So, The integration/generation of this id/key with the folder must take place during every operation involving the file(copy,cut etc). I'd love to solve the bug myself given the guidance.

I'm new to haiku and it'll be great if someone could help me out fixing this bug.



If the system would just keep ino_t directory (see entry_ref) the same for each folder, that would give us a unique and invariable identifier.

Not sure how deep that goes...

I would certainly prefer to have a unique -and immutable- id for each folder. It would allow concurrent batching and would greatly simplify the caching tasks of some of my projects... meaning we could move a folder while copying contents into it without a hiccup... and ordain specialized identifiers for certain folders (such id 0, which could vfs '/', and 1337 which could be anything /etc/... once the system was fully migrated we could rename folders at will). I'd certainly prefer storing an ino_t (int64, IIRC) rather than a string...

As for the bug - I am rather certain it is localized to Tracker, especially given the prior behavior was to rename the incoming conflicting name so as to not conflict... a centralized ID could solve naming conflict by exempting Trash from unique names, or you could just restore the aforementioned behavior.

--The loon

Other related posts: