Re: tree view, more tweaking

Janek Kozicki said:     (by the date of Fri, 14 May 2010 18:05:41 +0200)

> It is now quite intuitive.

I wanted to add also a flag (yes,no,unknown) tree_entry->has_subdirs,
to avoid constant rescanning with a call to function:

  does_it_have_subdirectories (tree_entry *current)

after scanning it was storing the result (yes,no) in tree_entry->has_subdirs

It worked except for one thing: I could not find the place where this
variable should be initialized to "unknown". And so it was initialized
randomly ;) And I don't know the places, where something happens to
the tree (creating / deleteing directory, moving them, etc).

So currently does_it_have_subdirectories is slightly slower if you
have a directory with lots of files, but without a subdirectory.

best regards
Janek Kozicki                       |

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]