FossifyOrg / Gallery

Browse your memories without any interruptions with this photo and video gallery
https://www.fossify.org
GNU General Public License v3.0
1.78k stars 61 forks source link

Cache issue: Wrong files used when gallery is invoked by K9 Mail #264

Closed michaelof closed 4 months ago

michaelof commented 4 months ago

Checklist

Affected app version

1.1.3

Affected Android/Custom ROM version

Android 11

Affected device model

Nokia 7.2

How did you install the app?

GitHub releases

Steps to reproduce the bug

  1. Open Email with JPEG attachement within K9 Mail aka Thunderbird Mobile in future.
  2. K9 shows correct thumbnail of appended jpeg.
  3. Click on thumbnail
  4. Android asks for "open with", select Fossify Gallery, once or always
  5. Wrong picture shown

Expected behavior

Appended picture should be opened shown in Gallery

Actual behavior

This issue appears more or less reproducable FIRST after a while, after having received a lot of emails of this type. When happening first, after that point not always, but more and more often. These emails are sent from a video doorbell, attachement has always the same file name, e.g. PIC01.JPG. When Gallery is invoked from K9 Mail, file name shown in Gallery is somewhat like a large hex string, like a GUID. If a "wrong" file is shown by Gallery, this file is ALLWAYS a picture previously received from the doorbell. That's why my assumption was caching mechanism issue. Deleted Gallery's cache, stopped and (re)started Gallery: Issue GONE. For a while, issue reappears after an unknown for me amount of this specific emails received.

NO IDEA who handles, triggers the file name / caching mechanism, maybe K9 is the culprit :)

If say "save attachement", original file name is used, and opening it from Fossify File Manager to Gallery works fine.

IMHO a hint that's a Gallery issue is the following:

  1. resetted the open with settings to "ask"
  2. click on attachement
  3. a) open with Gallery: WRONG picture
  4. b) repeat 2. and open with e.g. Orion (PDF) Viewer: CORRECT picture is shown, ALTHOUGH long hex Guid-style file name is the same.

Screenshots/Screen recordings

No response

Additional information

No response

Aga-C commented 4 months ago

It's a duplicate of https://github.com/FossifyOrg/Gallery/issues/117. You can move your bug description to the comment there.