A possible bug?

Hi all,
Either this is a possible bug, or I don't understand something, my guess is,
its the latter. Also I'm working from Tors win32 gtk sources, but I am
fairly sure its the same as that which resides on the gnome cvs as gtk-1.3.
Lastly I am
currently learning Linux so do not have the knowledge of how the passwording
works or how to test this aspect (which the possible bug is about)

In gtkfilesel.c theres a routine called gtk_file_selection_populate. Either
relative (double clicking on a directory) or absolute pathnames (as typed in
when in the Gimp file selection dialog) are passed when you're moving
between directories. As far as I understand it gtk_file_selection_populate
passes this as an argument to cmpl_completion_matches. Here the first
character of the string is tested to see if its a '~' within an #ifdef
HAVE_PWD_H condition, so if its a relative pathname that will pick it up,
but not so for absolute pathnames. Next the pathname is passed on to
open_ref_dir. Here whether or not its an absolute pathname is determined. If
it is a relative pathname it reaches another #ifdef HAVE_PWD_H condition and
the check is performed again. However with the absolute pathname the root
directory is read (and buffered and so on) and then when it reaches the
find_completion_dir function all the absolute pathnames directories are in
turn opened and read but with no check for the have password condition. Is
this a bug? As find_completion_dir iterates through the parent directories
they become relative pathnames before becoming again absolute path names for
themselves to be opened.

If indeed there is no need to test for the '~' condition what purpose does
it serve to iterate through all the directories of an absolute pathname in
order just to open it?

Much gratitude in anticipation


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