Skip to content

File last updated does not alway show the correct date and time #322

Open

Description

@salt-and-sauce

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected app version

1.4.0

Affected Android/Custom ROM version

Android 16, October 5 security update

Affected device model

Pixel 9a

How did you install the app?

Google Play Store

Steps to reproduce the bug

For some file updates the date/time as shown in Files does not update.

Expected behavior

Files should show the same date time as other file browsers (Google Files or via PC connected) See examples.

Actual behavior

See examples - I see an older time in Fossify Files, even when refreshing (and clearing cache).

Screenshots/Screen recordings

ignoreImageMinify ignoreImageMinify

Additional information

No response

Activity

  1. added
    bug
    needs triage
    on Nov 20, 2025
  2. naveensingh commented on Nov 20, 2025

    @naveensingh
    Member
    • Are those files being synchronized using something?
    • Are files outside the Sync folder also affected?
  3. added
    waiting for author
    on Nov 20, 2025
  4. salt-and-sauce commented on Nov 20, 2025

    @salt-and-sauce
    Author
    • Are those files being synchronized using something?
    • Are files outside the Sync folder also affected?

    They are being sync'd but that's not the propbem. I see the issue when updating (appending usually) from my own Java program. The code to update a file looks like this:

    FileOutputStream outputStream = new FileOutputStream(new File(Bank.getPath(), mFile+".txt"), true); // true means append
    outputStream.write(line.getBytes());
    outputStream.close();

    I find it curious that other file browser show the expected timestamp. Thanks!

  5. added
    needs reproduction
    and removed
    waiting for author
    needs triage
    on Nov 20, 2025
  6. naveensingh commented on Nov 20, 2025

    @naveensingh
    Member

    It should work fine if you also update the MediaStore DB after updating the file.

  7. removed
    needs reproduction
    on Nov 20, 2025
  8. salt-and-sauce commented on Nov 20, 2025

    @salt-and-sauce
    Author

    Ah OK - we can close this issue. Thanks!

  9. naveensingh commented on Nov 20, 2025

    @naveensingh
    Member

    No, that is a workaround. This still needs to be fixed here.

  10. salt-and-sauce commented on Nov 20, 2025

    @salt-and-sauce
    Author

    Cool - thanks for that. I'll watch for an update. Thanks for the quick triage - I really like the app,

  11. added
    niche
    device/software specific
    and removed
    device/software specific
    on Dec 1, 2025
  12. PedroFlores199 commented on Nov 27, 2026

    @PedroFlores199

    I could reproduce this on an emulator (Android 17). After appending a line to a file from adb shell (echo ... >> file), the file's mtime changed to 16:14 but MediaStore kept the old date_modified (16:11), and the folder list showed 04:11 PM.

    The folder list takes the date from MediaStore (getFolderLastModifieds() in ItemsFragment.getRegularItemsOf()) and only falls back to file.lastModified() when MediaStore has no entry. Search results already pass an empty map, so they always use the file's own date.

    I have a fix that does the same for the folder list: it uses file.lastModified() and drops the MediaStore lookup there. The code already calls isDirectory and length() on each file, so it's one more read of the same file. With it, the same file shows 04:14 PM. Build, detekt and lint pass:
    main...PedroFlores199:File-Manager:fix/folder-item-last-modified

    I can open a PR if you'd like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdevice/software specificniche

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions