cjwl / cocotron

The Cocotron
http://cocotron.org
MIT License
412 stars 103 forks source link

GetFileSecurityW(path, OWNER_SECURITY_INFORMATION, ...) on network shares #5

Open cyclaero opened 9 years ago

cyclaero commented 9 years ago

The method -[NSFileManager attributesOfItemAtPath::] in file Foundation/platform_windows/NSFileManager_win32.m on line 604 does call GetFileSecurityW(path, OWNER_SECURITY_INFORMATION, ...), and on Windows 7 HP 32bit it returns always 0 for files on network shares, which prevents my application opening files from said shares.

Is it really necessary to cancel file opening because of this? My application doesn't use the OWNER_SECURITY_INFORMATION anyway. My hot fix is, to fall through to normal operation (removed lines 648-650), and by this way, files on network shares can be opened successfully.

If there is a better solution, please let know.