Re: [Nautilus-list] Cache getpwuid results



On Wed, 15 Aug 2001, Darin Adler wrote:

> Even though it would make things a bit less elegant, it would make this 
> lot cleaner if the caching and getting the user information was done in a 
> separate function. Would you be willing to refactor this into a separate 
> function?
Sure.
 
> Also, I think you need to set primary_group to 0 when password_info is 
> NULL, because otherwise you might remember an old primary group from the 
> last time you checked, 5 minutes ago. (Not that this will ever really come 
> up.)
I actually checked if password_info != NULL before using primary_group.
 
> In addition, I normally like to steer clear of minor shortcuts like 
> assuming that the tv_sec of a real time will never be 0. A separate flag 
> to tell you if you've ever gotten the user ID information would do the 
> trick without requiring any subtlety, but you may find that last elegant.
Sure.
 
> Otherwise, the patch looks great, and I'd encourage you to get a corrected 
> version in soon.
New version comming up.

/ Alex






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