Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification time sometimes resets when downloading #284

Open
abel1502 opened this issue Mar 30, 2025 · 1 comment
Open

Modification time sometimes resets when downloading #284

abel1502 opened this issue Mar 30, 2025 · 1 comment
Labels

Comments

@abel1502
Copy link

Environment:

  • MEGA app Version(s): 15.4.1
  • OS Version(s): Android 12
  • Devices/Simulators: Samsung Galaxy M31

Describe the bug

When downloading files to device, sometimes (after a recent update, very often) the local file's last modification time is reset to the current time, instead of being preserved as it is on the cloud.

A workaround I found is to clear the cache, and then download the oter really quickly.

Reproduction Steps

  1. Go to the photos tab, timeline view.
  2. Click on a photo. View it for a couple seconds, scroll to its neighbors.
  3. Click the download icon in the top right.
  4. Go to the gallery app and observe the file date (likely) set to the current time.
  5. If it didn't work, try again. For me this happens more than half the time now.

Expected behavior

The downloaded photos should have the same mtime as the ones I originally uploaded. This behavior should be consistent every time.

Additional context

I've found out after some quick research that there was, apparently, a bug in Android that sometimes prevented mtime from being updated on an existing file. I don't know it it is related to the problem at hand, but if so, the recommended workaround was to set the correct mtime at file creation, rather than updating it later.

That said, I suspect there's probably an automatic mtime update taking place domewhere along the way when files are downloaded to the cache and then copied from there instead of downloading again. I'd appreciate, if no better solution is found, a configuration option to always redownload files from the cloud when clicking on the download button rather than using the cache. Of course, if you find that the problem is actually elsewhere, please ignore this suggestion.

@abel1502 abel1502 added the bug label Mar 30, 2025
@abel1502
Copy link
Author

abel1502 commented Apr 1, 2025

I noticed a related issue: even already downloaded photos occasionally seem to have their mtime updated to a later date. I've had it happen twice now. Both times were at least several hours after I last opened the MEGA app, and I have no folder sync active on my phone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant