Skip to content

fix: manually set modified time to SFTP files after editing#58970

Draft
rikled wants to merge 1 commit intomasterfrom
fix/sftp-mtime
Draft

fix: manually set modified time to SFTP files after editing#58970
rikled wants to merge 1 commit intomasterfrom
fix/sftp-mtime

Conversation

@rikled
Copy link

@rikled rikled commented Mar 16, 2026

Summary

This PR fixes SFTP file writes. When uploading a file to the SFTP server, the files original modified date is not preserved. The SFTP server typically sets the modified date to the time of upload. This leads to issues, for example, with Nextcloud Office, which expects the mtime to match the mtime of the file. Nextcloud office then repeatedly throws errors indicating that the file has been modified externally. In this PR the SFTP implementation explicitely sets the modified date of the file.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Hendrik Leidinger <hendrik.leidinger@nextcloud.com>
@juliusknorr juliusknorr added bug 3. to review Waiting for reviews labels Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants