ridiculousfish/HexFiend — pull request #2 by sutes (2011-12-22 06:51:09+00:00)
Title: Few fixes and refactored HFPrivilegedHelper slightly.

1. Fixed HFUnprivilegedHelper so that it works with character devices needing alignment.

2. Fixed bug in privileged helper where it would open file with wrong mode i.e. it would open writable files as read/only and vice versa.

3. Refactored privileged helper so it returns file descriptor which means the HFUnprivilegedFileReference code can now be used in all cases for reading writing files. I haven't tested the code on Snow Leopard. It should work, but it might not.

4. Added authorization check to privileged helper when opening files. Won't make much difference except if Hex Fiend has been left open for some time and you attempt to open a file that needs elevated privileges.

5. Fixed bug which would cause crash when an error occurs when opening a file (error would get released too soon).

6. Added support for writing to block and character devices.

7. Default to overwrite mode when file is > 64 MB.