[PD] [declare -stdpath] has no effect on Windows
IOhannes m zmölnig
zmoelnig at iem.at
Wed Sep 9 15:33:13 CEST 2015
On 09/09/2015 08:48 AM, Roman Haefeli wrote:
> Now, the argument to -stdpath is appended unconditionally to the search
> paths. There is probably good reason why there is a check, I'm not
> proposing to remove it. But maybe this is gives you a hint at where
> things go wrong. Somehow the check always fails on Windows, even if the
> directory exists, while it works fine on Linux.
thanks for the tests.
i think i found the cause of the problem:
on w32 we cannot use "open()" to check whether a *directory* exists
(which is what the "check_exists()" test boils down to).
here's what [msdn] says about he return values of open():
<snip>
EACCES
Tried to open a read-only file for writing, file's sharing mode does
not allow the specified operations, or the given path is a directory.
</snip>
i've a working solution on my harddisk, that re-implements
check_exists(), but i'm unsure whether i should turn that into a public
function `sys_exists()` so it can be used in other places (e.g.
externals) as well...
fdsmrsa
IOhannes
[msdn] https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150909/1abc2133/attachment.sig>
More information about the Pd-list
mailing list