> Hello Zac.
>
> Attached is the merge directive for pdf_fsys_disk_item_p.
>
> + file = fopen ((char*)ascii_path, "r");
> + if (file == NULL)
> + {
> + goto error_cleanup;
> + }
>
> Note that such a call to fopen will fail if the file is not readable,
> but still exists in the filesystem. Also, it will work for directories
> in POSIX systems but, will it work in windows systems?
>
> This function should also work for files for which the client doesnt
> have read perms.
Yep, I missed this mail. That's my point in my previous mail.
>
> I would suggest to use 'stat' or 'lstat' to do this (those functions
> has support for directories, special files, etc). AFAIK mingw has
> support for the stat function and anyway we have the sys_stat.h
> portability file from gnulib already installed in libgnupdf.
stat gives you the permission bits, but we should also consider the way
the filesystem was mounted (read-only filesystems can happen). access()
is the good way to do it, but don't know if it's portable or not.
-Aleksander