EnterpriseyIntranet / nextcloud-API

NextCloud OCS API for Python
GNU General Public License v3.0
27 stars 27 forks source link

Add support for syncing file's last-modified time on upload & donwload #49

Closed tthmmts closed 4 years ago

tthmmts commented 4 years ago

Hi, this project is wonderful and useful!

The WebDAV API does not support modifying the mtime of a file. However, Nextcloud API allows changing mtime by HTTP X-OC-MTIME header.

This keeps the modified timestamp (mtime) of files on upload and download. This script provides the supports to preserve the timestamp of a local file to the upload file on Nextcloud storage with PUT method and X-OC-MTIME header, and set mtime of the local file by meta info on Nextcloud after download.

codecov-io commented 4 years ago

Codecov Report

Merging #49 into master will increase coverage by 0.24%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage   92.89%   93.14%   +0.24%     
==========================================
  Files          17       17              
  Lines         577      598      +21     
==========================================
+ Hits          536      557      +21     
  Misses         41       41
Impacted Files Coverage Δ
src/nextcloud/api_wrappers/webdav.py 96.15% <100%> (+0.42%) :arrow_up:
src/nextcloud/requester.py 97.24% <100%> (+0.21%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 22cbe7a...9ace67e. Read the comment docs.

tthmmts commented 4 years ago

I'm glad for your reply.

Your points are important and valuable to fix. Please give me time to fix it.

scrutinizer-notifier commented 4 years ago

The inspection completed: 5 updated code elements

tthmmts commented 4 years ago

I fixed your reviews. Please confirm.

matejak commented 4 years ago

Perfect, thank you for your contribution!

tthmmts commented 4 years ago

Thank you for accepting my PR !