From d8a357e01ae4f094af433db4b675e1dee31e8b99 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sun, 3 Apr 2016 18:03:52 -0700 Subject: [PATCH] image-source: Use os_stat instead of stat (Note: This commit also modified text-freetype2) Prevents issues from being able to update files that may not be using the current system encoding on windows. --- plugins/image-source/image-source.c | 2 +- plugins/text-freetype2/text-functionality.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/image-source/image-source.c b/plugins/image-source/image-source.c index b962fa8a0..ee901fd31 100644 --- a/plugins/image-source/image-source.c +++ b/plugins/image-source/image-source.c @@ -30,7 +30,7 @@ struct image_source { static time_t get_modified_timestamp(const char *filename) { struct stat stats; - if (stat(filename, &stats) != 0) + if (os_stat(filename, &stats) != 0) return -1; return stats.st_mtime; } diff --git a/plugins/text-freetype2/text-functionality.c b/plugins/text-freetype2/text-functionality.c index 891c44579..06834573b 100644 --- a/plugins/text-freetype2/text-functionality.c +++ b/plugins/text-freetype2/text-functionality.c @@ -319,7 +319,7 @@ time_t get_modified_timestamp(char *filename) // stat is apparently terrifying and horrible, but we only call it once // every second at most. - if (stat(filename, &stats) != 0) + if (os_stat(filename, &stats) != 0) return -1; return stats.st_mtime;