diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2012-04-21 03:31:39 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2012-04-21 03:31:39 +0000 |
commit | 47d91778999bea3484296ab2725bac47879dd7cc (patch) | |
tree | 63ca5e08ca185d4320866be796724a10005b8b6e /Build/source/texk/xdvipdfmx | |
parent | 2b77290bf31221488dd1c4eb20b8195cb93531bd (diff) |
Apply Alexander's pdf:fstream patch
http://project.ktug.or.kr/pipermail/dvipdfmx/2012-March/000301.html
git-svn-id: svn://tug.org/texlive/trunk@26081 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvipdfmx')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/spc_pdfm.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/spc_pdfm.c b/Build/source/texk/xdvipdfmx/src/spc_pdfm.c index e9ec3d3503f..204d695f8ef 100644 --- a/Build/source/texk/xdvipdfmx/src/spc_pdfm.c +++ b/Build/source/texk/xdvipdfmx/src/spc_pdfm.c @@ -1469,7 +1469,7 @@ spc_handler_pdfm_stream_with_type (struct spc_env *spe, struct spc_arg *args, in { pdf_obj *fstream; long nb_read; - char *ident, *instring; + char *ident, *instring, *fullname; pdf_obj *tmp; FILE *fp; @@ -1505,11 +1505,19 @@ spc_handler_pdfm_stream_with_type (struct spc_env *spe, struct spc_arg *args, in RELEASE(ident); return -1; } - fp = DPXFOPEN(instring, DPX_RES_TYPE_BINARY); + fullname = kpse_find_pict(instring); + if (!fullname) { + spc_warn(spe, "File \"%s\" not found.", instring); + pdf_release_obj(tmp); + RELEASE(ident); + return -1; + } + fp = DPXFOPEN(fullname, DPX_RES_TYPE_BINARY); if (!fp) { spc_warn(spe, "Could not open file: %s", instring); pdf_release_obj(tmp); RELEASE(ident); + RELEASE(fullname); return -1; } fstream = pdf_new_stream(STREAM_COMPRESS); |