diff options
-rw-r--r-- | e-util/ChangeLog | 5 | ||||
-rw-r--r-- | e-util/e-folder-map.c | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 5d33d86b20..cb33bf97cc 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2004-01-26 JP Rosevear <jpr@ximian.com> + + * e-folder-map.c (e_folder_map_dir): use g_file_test instead of + stat and pass the type e_folder_map_dir when recursing + 2004-01-24 JP Rosevear <jpr@ximian.com> * e-folder-map.c: turn off debugging diff --git a/e-util/e-folder-map.c b/e-util/e-folder-map.c index fd845a4b48..8643152a06 100644 --- a/e-util/e-folder-map.c +++ b/e-util/e-folder-map.c @@ -93,7 +93,6 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list) { char *path; const char *name; - struct stat st; GDir *dir; GError *error = NULL; @@ -116,7 +115,7 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list) try_subdirs: path = g_build_filename (dirname, "subfolders", NULL); - if (stat (path, &st) == -1 || !S_ISDIR (st.st_mode)) { + if (!g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) { g_free (path); return; } @@ -140,7 +139,7 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list) continue; } - e_folder_map_dir (full_path, full_path, dir_list); + e_folder_map_dir (full_path, type, dir_list); g_free (full_path); } |