diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-09 23:14:44 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-09 23:14:44 +0200 |
commit | 63848329d1ee61e30a557a31a3b2d811a13ed421 (patch) | |
tree | 1371802d6e74a5dc3e66ccbafc9808f21a701d46 /apps | |
parent | e1821913168d9c4d74b92862fbbdfb55b2a31b18 (diff) | |
download | mupdf-63848329d1ee61e30a557a31a3b2d811a13ed421.tar.xz |
Allow multibyte filenames in mupdf windows app for XPS documents.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfapp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c index fc2cfdfb..f199f12e 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -165,12 +165,13 @@ static void pdfapp_open_pdf(pdfapp_t *app, char *filename, int fd) static void pdfapp_open_xps(pdfapp_t *app, char *filename, int fd) { fz_error error; + fz_stream *file; - close(fd); // TODO: fix this for windows - - error = xps_open_file(&app->xps, filename); + file = fz_open_fd(fd); + error = xps_open_stream(&app->xps, file); if (error) - pdfapp_error(app, fz_rethrow(error, "cannot open document: '%s'", filename)); + pdfapp_error(app, fz_rethrow(error, "cannot open document '%s'", filename)); + fz_close(file); app->doctitle = filename; |