summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-01-02 21:14:35 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-01-02 21:33:51 +0100
commitd8d700ec734c0d027517ab03553dc878616e13a5 (patch)
tree1687897a0a0b5f44ce64a07858e08b0ebdb8fc73
parentef9cc9e0133956f3c7871f9b826ba814d55509ab (diff)
thumbnails: Use g_stat in get_mtime.
-rw-r--r--thumbnails.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/thumbnails.c b/thumbnails.c
index 33b0573..19cc817 100644
--- a/thumbnails.c
+++ b/thumbnails.c
@@ -1,5 +1,4 @@
#include <unistd.h>
-#include <utime.h>
#include <string.h>
#include <glib/gstdio.h>
@@ -23,10 +22,10 @@ inline static gchar *get_wall_thumb_name(const gchar *filepath) {
}
inline static time_t get_mtime(const gchar *filepath) {
- struct utimbuf times;
+ struct stat sb;
- if(g_utime(filepath, &times) == 0) {
- return times.modtime;
+ if(g_stat(filepath, &sb) == 0) {
+ return sb.st_mtime;
} else {
return 0;
}