Re: [AD] dat/grabber and pack_fopen_chunk |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Saturday 21 January 2006 02:06, Peter Wang wrote:
> I found the bug, but I don't have time to fix it. If someone could fix
> it, that would be great. Here is the problem: there is a call to
> pack_fopen_chunk() in datedit.c that fails. Due to some sloppy
> coding, this was not checked. pack_fopen_chunk() is implemented by
> opening a temporary file so even if you have write access to the
> target directory it could fail if you don't have write access to the
> directory for the temporary file (I think it is the current
> directory).
Just out of morbid curiosity, why is this nescessary?
> Someone needs to fix pack_fopen_chunk().
Apart from my above question, what would the proper fix be? I guess writing
to the temp directory would be ok ($TEMP or $TMP should work for that in
Windows as well as *NIX, right?), or writing to the same directory as the
PACKFILE. I assume (but am too lazy to check) that this information is
stored in the PACKFILE struct?
> In the meantime, I will apply a patch so at least dat and grabber will
> return a failure code rather than aborting.
How about changing the active directory to the directory the PACKFILE is
in? Wouldn't that solve the problem?
It's a nasty workaround, but I think it should work?
Evert