[PATCH] Shows an error about wrong permissions

Lubomir I. Ivanov neolit123 at gmail.com
Thu Nov 13 11:12:03 PST 2014


2014-11-13 1:27 GMT+02:00 Salvo Tomaselli <tiposchi at tiscali.it>:
>> +     } else if (access(data->devname, R_OK | W_OK) != 0)
>
> Hm. Now that I think of it. I don't know if this works on Windows…
>

access() is part of the Win32 C library, but it needs UTF-16 to work
for non-ASCII paths (_waccess()).
we already do this for a set of functions such as fopen(), rename()
etc, so a new wrapper function subsurface_access() has to be added.

two patches are attached.
(the second one is just some cleanup)

another solution would be to not use access().

lubomir
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-subsurface_access.patch
Type: application/octet-stream
Size: 3518 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141113/b08b7c9a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-windows.c-small-cleaup-in-the-wrapper-functions.patch
Type: application/octet-stream
Size: 1722 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141113/b08b7c9a/attachment-0003.obj>


More information about the subsurface mailing list