Closed kk-hiraskar closed 3 years ago
I am experiencing this as well in Raspberry Pi OS 32 (Buster). Are there extensions to webdav that fix this? This bug makes easywebdav not useful, as it destroys time order of medical files.
I am experiencing this as well in Raspberry Pi OS 32 (Buster). Are there extensions to webdav that fix this? This bug makes easywebdav not useful, as it destroys time order of medical files.
Last year when I faced this, handled with some alternative, I will check my code archive and let you know tomorrow.
Webdav file download seems just the old method of data download, so file properties are not preserved!
To preserve timestamp, here is a solution:
list directory and get the details necessary in some dictionary
list=webdav.ls(dir)
for f in list:
name = re.sub(r'^\/content\/dav\/','',f.name)
(modifiedTime, createdTime) = (f.mtime, f.ctime)
download the file,
webdav.download(srcFileName, targetFileName)
and now, on individual files apply the respective time stamps
# for Linux
os.utime(targetFileName, (modifiedTime, createdTime))
import win32file win32file.SetFileTime(targetFile, createdTime, modifiedTime, modifiedTime)
for understanding, just required code is explained above.
kindly handle loops, exceptions and all other factors.
Hi, Timestamps are not preserved in downloaded file, both created and modified, I see some workarounds on another link https://github.com/mar10/wsgidav/issues/112
is it possible to fix this issue ?