search for: winaccessw

Displaying 3 results from an estimated 3 matches for "winaccessw".

Did you mean: inaccess
2018 Jul 02
2
Bug in file.access on Windows when using network shares
..., I've run into an issue with a package (vcfR) that uses file.access to check a file is readable before opening it. The issue is actually in base R though. I've looked into the package code, and it calls file.access(path, mode = 4). I've created a minimal working example of the code in winAccessW from src/gnuwin32/extra.c, and the problem arises when GetFileSecurityW is called on shared files under certain circumstances. One situation I've seen it in are when a file is shared from a non-Windows host (e.g. Linux), which is similar to the situation documented at https://social.msdn.micro...
2018 Jul 03
1
Bug in file.access on Windows when using network shares
...the same commands again file.access("//mypc/myshare/test.txt",0) # Returns 0 file.access("//mypc/myshare/test.txt",4) # Returns -1 regardless of whether the original host was Windows or non-Windows In all cases the file is actually readable. I've created my own version of winAccessW in extra.c at https://github.com/NikNakk/r-source/commit/0a82f6d23b8a2ace44e43a28cb6eb923145a13c8 Almost all of the code in here can be replaced with a simple call to _waccess, other than the check for executable. This seems to work as expected. Since _waccess exists as a system call within Window...
2018 Jul 03
0
Bug in file.access on Windows when using network shares
...errors. Please note there is a disclaimer in ?file.access to this effect. If you still want to report a bug in file.access, please provide an example that does not require a package, and provide more details (what do you think would be the correct behavior, etc). From looking at the code, when winAccessW/GetFileSecurityW fails to retrieve information about the file, file.access would signal an error, which seems to be a fine behavior for me. It is not surprising to me that in some cases (like working on a local copy of a file in a distributed file-system), the OS would not know whether a file i...