Skip to content

Conversation

@D-VR
Copy link
Collaborator

@D-VR D-VR commented Nov 18, 2025

This supersedes PR #117

  • Sciebo shares are now traversed via WebDAV PROPFIND with an explicit request for oc:checksums, so each file gets a stable content hash (SHA1) in addition to getetag.
  • For each Sciebo item, we store the SHA1 checksum on the node as its etag and persist it in the per‑course .syncmymoodle_cache alongside the usual Moodle nodes.
  • During downloads, we use the cached Sciebo checksum to detect remote changes: if the SHA1 from the new PROPFIND matches the old cached one, we skip re‑downloading that file.
  • When the remote checksum changed, we hash the local file and compare it to the old checksum to detect local modifications; if they differ, we treat this as a sync conflict and apply the same
    update_files_conflict strategies (rename, keep, overwrite) as for Moodle files.
  • If there is no cache yet but a local file already exists, we compare its hash against the current Sciebo checksum from PROPFIND; if they match, we treat the file as up‑to‑date and skip both downloading and
    conflict handling.

This solves #110
This PR (should) also fix #74 by checking the response header when resuming partially downloaded files
And as far as I can tell, the current code should resolve #35

@D-VR D-VR merged commit 8c73b50 into master Nov 18, 2025
4 checks passed
@D-VR D-VR mentioned this pull request Nov 18, 2025
@D-VR D-VR added the enhancement New feature or request label Nov 18, 2025
@D-VR D-VR deleted the add-safe-sciebo-file-updating branch November 19, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PDF files damaged Handle files with the same filename

3 participants