diff options
author | Jjgod Jiang <gzjjgod@gmail.com> | 2015-04-27 12:31:57 +0000 |
---|---|---|
committer | Jjgod Jiang <gzjjgod@gmail.com> | 2015-04-27 12:31:57 +0000 |
commit | 09d9e89850689beecb8953eb8ae3a7be9e5b3983 (patch) | |
tree | 9b328137785f0c7f45bba08d47992d2acdc166b4 /Build | |
parent | fd4cc6e56459823fdf504116753157408f3171f5 (diff) |
Ignore empty file in filetype checking
On OS X 10.6 at least opening non-exist resource fork of a file with /rsrc
suffix by fopen() will not return NULL but instead you will get a valid
FILE* but you can't read anything. It regressed in r36978, probably
because we didn't try to check for dfonts like that before the change.
git-svn-id: svn://tug.org/texlive/trunk@37074 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/dpxfile.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index aed0743afec..2daed04ff11 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,7 @@ +2015-04-27 Jiang Jiang <gzjjgod@gmail.com> + + * dpxfile.c: Ignore empty file in filetype checking. + 2015-04-26 Jiang Jiang <gzjjgod@gmail.com> * cidtype0.c, cidtype2.c: Support loading CID type 0 font from diff --git a/Build/source/texk/dvipdfm-x/dpxfile.c b/Build/source/texk/dvipdfm-x/dpxfile.c index 11fcb1de5b9..34ab9b0d6b3 100644 --- a/Build/source/texk/dvipdfm-x/dpxfile.c +++ b/Build/source/texk/dvipdfm-x/dpxfile.c @@ -1168,6 +1168,9 @@ qcheck_filetype (const char *fqpn, dpx_res_type type) if (stat(fqpn, &sb) != 0) return 0; + if (sb.st_size == 0) + return 0; + fp = MFOPEN(fqpn, FOPEN_RBIN_MODE); if (!fp) { WARN("File \"%s\" found but I could not open that...", fqpn); |