A simple patch to make the file sel dialog not always select the first

file in the directory.
This commit is contained in:
Raph Levien
1997-12-14 07:54:37 +00:00
parent da34538894
commit 123778f381

View File

@ -814,6 +814,9 @@ file_open_ok_callback (GtkWidget *w,
g_assert (filename && raw_filename); g_assert (filename && raw_filename);
if (strlen (raw_filename) == 0)
return;
err = stat (filename, &buf); err = stat (filename, &buf);
if (err == 0 && (buf.st_mode & S_IFDIR)) if (err == 0 && (buf.st_mode & S_IFDIR))