Fixed: HxD: files opened "read only" require write

Bug reports concerning HxD.
Post Reply
mhurley
Posts: 15
Joined: 28 Jun 2006 04:14

Fixed: HxD: files opened "read only" require write

Post by mhurley » 07 Jul 2006 15:56

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.

Maël
Site Admin
Posts: 1164
Joined: 12 Mar 2005 14:15

Post by Maël » 08 Jul 2006 15:47

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

mhurley
Posts: 15
Joined: 28 Jun 2006 04:14

Post by mhurley » 10 Jul 2006 19:24

The dev version you posted appears to fix the problem.

Maël
Site Admin
Posts: 1164
Joined: 12 Mar 2005 14:15

Post by Maël » 04 Apr 2007 14:11

Fixed in the actual beta version (see download section)

xnifle
Posts: 2
Joined: 05 Nov 2007 08:25

Post by xnifle » 05 Nov 2007 08:31

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.

Maël
Site Admin
Posts: 1164
Joined: 12 Mar 2005 14:15

Post by Maël » 05 Nov 2007 13:55

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.
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).

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.

xnifle
Posts: 2
Joined: 05 Nov 2007 08:25

Post by xnifle » 06 Nov 2007 05:45

cool! it'll be helped! thanks!

Maël
Site Admin
Posts: 1164
Joined: 12 Mar 2005 14:15

Post by Maël » 16 Apr 2008 14:51

The new version 1.7.6 implements a more relaxed file sharing. (Details at http://mh-nexus.de/hxd/#whatsnew)

Post Reply