If you open a file with the "read only" checkbox checked in the open file dialog, my application, which uses GENERIC_READ access and FILE_SHARE_READ sharing, cannot get a handle to the same file.
If in my application I open the file with FILE_SHARE_READ|FILE_SHARE_WRITE I can get a handle.
I would expect HxD to not need write access if the read only checkbox is checked when selecting the file to open.
Fixed: HxD: files opened "read only" require write
Yes, that is too restrictive, these rights aren't necessary.
I uploaded a fixed version. It is in German as it is my development version, but should be enough to confirm if it works.
see here: http://mh-nexus.de/downloads/HxD.zip
I uploaded a fixed version. It is in German as it is my development version, but should be enough to confirm if it works.
see here: http://mh-nexus.de/downloads/HxD.zip
Some applications recreate the file instead of just writing it which will not work as HxD keeps it open, also in readonly-mode. The intended fix was to allow writing but not creating a file (so technically it is fixed since the current version does not prohibit writes just recreating files).xnifle wrote:Is it fixed really? I've opened a text file on notepad and hxd for writing test, I cannot save the file on notepad. 1.7.1.0 beta version used.
But I have implemented a file locking mechanism in my current development version that only locks a file after you made the first change to a file in HxD, after saving this lock is released (this involved quite some changes as many parts of HxD relied on keeping the file open, which is why I didn't opt for this solution right from the start).
So if you haven't changed a file loaded in HxD or saved the changes, you will be able to modify/recreate the file outside of HxD.
This will be available in the 1.7.2 stable, the latest on end of December or begin of January.
The new version 1.7.6 implements a more relaxed file sharing. (Details at http://mh-nexus.de/hxd/#whatsnew)