jung-kurt / luahpdf

LuaHPDF is a module that lets you programmatically create PDF files using Lua.
23 stars 10 forks source link

SaveToFile error when there's no write permission #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install luahpdf systemwide
2. change working directory to source tree
3. chmod -x demo/
4. cd demo
5. lua font_demo.lua

Program exit with error 1, it should give a warning about not having write 
permission and exit gracefully.
Actual output is:
{{{
lua: HPDF error 0x1017, detail 13
stack traceback:
    [C]: in function 'SaveToFile'
    font_demo.lua:93: in main chunk
    [C]: ?
}}}

I'm on OS X 10.7 using luahpdf 1.1 with libharu 2.2.1 and lua 5.1.4, all 
installed with MacPorts.

Original issue reported on code.google.com by and.dam...@gmail.com on 27 Feb 2012 at 11:43

GoogleCodeExporter commented 9 years ago
Fixed: SaveToFile makes sure named file is unwriteable

Original comment by kurt.w.jung on 8 Mar 2012 at 6:31