summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2021-10-08 13:36:53 +0200
committerRobin Watts <Robin.Watts@artifex.com>2021-10-08 16:55:20 +0100
commitbd273820b8b613861ca7666a480c262f7a4ecd9b (patch)
treee8e5dac5e3011f3856485fcee8badf78f894d167 /platform/x11
parent3f050bc65f0a9ba841b57bbf483c7fe378df7c0e (diff)
Use common fz_stat_mtime function to handle UTF-8 paths on windows.
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/pdfapp.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c
index 4615b8817..e41a9eafe 100644
--- a/platform/x11/pdfapp.c
+++ b/platform/x11/pdfapp.c
@@ -6,11 +6,6 @@
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
-#include <sys/stat.h>
-
-#ifdef _MSC_VER
-#define stat _stat
-#endif
#ifdef _WIN32
#include <windows.h>
@@ -29,17 +24,6 @@
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
-time_t
-stat_mtime(const char *path)
-{
- struct stat info;
-
- if (stat(path, &info) < 0)
- return 0;
-
- return info.st_mtime;
-}
-
static int convert_to_accel_path(fz_context *ctx, char outname[], char *absname, size_t len)
{
char *tmpdir;
@@ -445,8 +429,8 @@ void pdfapp_open_progressive(pdfapp_t *app, char *filename, int reload, int kbps
{
/* Check whether that file exists, and isn't older than
* the document. */
- atime = stat_mtime(accelpath);
- dtime = stat_mtime(filename);
+ atime = fz_stat_mtime(accelpath);
+ dtime = fz_stat_mtime(filename);
if (atime == 0)
{
/* No accelerator */