Hiroyuki Ikezoe
ikezo****@users*****
Tue May 16 14:03:09 JST 2006
Index: kazehakase/src/utils/utils.c diff -u kazehakase/src/utils/utils.c:1.52 kazehakase/src/utils/utils.c:1.53 --- kazehakase/src/utils/utils.c:1.52 Mon Jan 23 12:05:28 2006 +++ kazehakase/src/utils/utils.c Tue May 16 14:03:09 2006 @@ -23,6 +23,7 @@ #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> +#include <glib/gstdio.h> #include "utils.h" #include "glib-utils.h" @@ -48,7 +49,7 @@ if ((temp[i + 1] == '/' || !temp[i + 1]) && !g_file_test(temp2, G_FILE_TEST_IS_DIR)) { - ret = mkdir(temp2, 0711); + ret = g_mkdir(temp2, 0711); #if 0 /* show dialog? */ if (ret != 0) @@ -70,14 +71,14 @@ temp = g_strdup_printf("%s/.thumbnails", g_get_home_dir()); if (!g_file_test(temp, G_FILE_TEST_IS_DIR)) { - mkdir(temp, 0711); + g_mkdir(temp, 0711); } g_free(temp); temp = g_strdup_printf("%s/.thumbnails/large", g_get_home_dir()); if (!g_file_test(temp, G_FILE_TEST_IS_DIR)) { - mkdir(temp, 0711); + g_mkdir(temp, 0711); } g_free(temp); } @@ -484,9 +485,9 @@ g_get_current_time(&now); t = (time_t)now.tv_sec; - if (stat(dirname, &st) == 0 && + if (g_stat(dirname, &st) == 0 && st.st_mtime < t - limit_seconds) - unlink(dirname); + g_unlink(dirname); } g_free(dirname); } @@ -549,7 +550,7 @@ thumb_filename = egg_pixbuf_get_thumb_filename(uri, EGG_PIXBUF_THUMB_LARGE); - ret = stat(thumb_filename, &st); + ret = g_stat(thumb_filename, &st); g_free(thumb_filename); if (ret == 0) @@ -571,7 +572,7 @@ filename, NULL); - ret = stat(history_filename, &st); + ret = g_stat(history_filename, &st); g_free(history_filename); g_free(filename); @@ -659,7 +660,7 @@ } } gdk_pixbuf_loader_close(converter->loader, NULL); - unlink(converter->filename); + g_unlink(converter->filename); g_idle_add(idle_dispose_converter, converter); return FALSE;