[haiku-bugs] Re: [Haiku] #17803: ShowImage will show an old file after overwriting it if a window stays open

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Wed, 15 Jun 2022 08:28:34 -0000

#17803: ShowImage will show an old file after overwriting it if a window stays 
open
-------------------------------------+----------------------------
  Reporter:  fatigatti               |      Owner:  leavengood
      Type:  bug                     |     Status:  new
  Priority:  normal                  |  Milestone:  Unscheduled
 Component:  Applications/ShowImage  |    Version:  R1/Development
Resolution:                          |   Keywords:
Blocked By:                          |   Blocking:
  Platform:  All                     |
-------------------------------------+----------------------------
Comment (by ttcoder):

 Yea.. I think there might be a ticket for this already. (is that for a
 recent hrev ?)

 I'm not certain which part of the code is to blame but I seem to remember
 it's here :
 https://git.haiku-os.org/haiku/tree/src/apps/showimage/ImageCache.h

 It uses an entry_ref (one of the very few bad ideas that Be came up with
 in their API). Thus when you double-click the "new" file2.png, it goes
 "ok, this is the same device, same directory, and the filename matches, so
 I can pull the old Bitmap from the cache, it's clearly the same file".

 Where it is not the same file obviously (not the same inode). But it
 doesn't know that.

 In my own builds I disable that part of the caching code as I find that
 bug very annoying indeed.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/17803#comment:1>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: