[Owncloud] Help needed with Patch to set the mtime via webdav
icewind at owncloud.com
Fri Feb 10 11:53:49 UTC 2012
On Friday 10 February 2012 11:40:24 Klaas Freitag wrote:
> I committed a patch today ( http://bit.ly/wVrb2u ) that allows to set
> the mtime of files with webDAV via propset, something we need to do
> proper syncing.
> I'd like to ask for help with a problem that the filesystem cache is not
> properly updated by this operation.
> I debuged that far:
> The mtime is correctly set in the file system.
> OC_FilesystemView has a method setFileMtime, which is implemented by
> calling basicOperation. This one fires a after_write signal, which is
> handled in the FileCache by method fileSystemWatcherWrite. From there it
> goes down to scanFile to update the data.
> In scanFile, the method stat is called on the view. This one does not
> the return the real new mtime from the file in the filesystem, but the
> one which is stored in DB.
> Robin, is it possible that the stat call takes the values from the cache
> instead of real stat'ing ? I am kind of lost in the redirections ;-)
Perhaps the the mtime is retrieved from php's internal cache, getting the
mtime from oc_filessytem wont take the value from the cache, the cache is only
Also, I think it would be better to call the added function to oc_filesystem
'touch' to stay closer to that "normal" php api
- Robin Appelman
More information about the Owncloud