Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Fix modified timestamp for chunk upload

Nicolas Gelot requested to merge 6784-fix-modified-ts into main

Description

For chunk upload we sent the timestamp from SyncedFileState which is defined in milli second while NextCloud excepts an Unix Timestamp in second. This patch provides the modified file date like it is done in uploadFile operation to be consistent.

Ref: https://gitlab.e.foundation/e/backlog/-/issues/6784

Screenshots

Technical details

Tests

  • on device setup a murena account with some picture in Photos directory
  • find a file greater than 3MB
    adb shell "find /storage/emulated/0/DCIM -type f -size +3MB"
  • update the file
    adb shell "echo test >>  filepath"
  • chunk upload is used to push the file on the cloud
    file folder
    image Capture_d_écran_du_2023-04-28_16-32-50
  • update edrive apk with the fix
  • update the file again
    adb shell "echo test2 >>  filepath"
  • chunk upload is used to push the file on the cloud
    file folder
    image image

Issues

https://gitlab.e.foundation/e/backlog/-/issues/6784

10 commandments of code reviews

👪 https://gitlab.e.foundation/internal/wiki/-/wikis/development/code-review

Edited by Vincent Bourgmayer

Merge request reports

Loading