aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/view.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-05-23 10:25:12 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2013-05-23 10:25:12 -0400
commit30330b4343b5bca82b95d9df4a13651c8e91063d (patch)
tree68979fb843a309e43803935f53afe74fab2844e4 /lib/files/view.php
parent3b6d850e592bbc6db9d67d25ee700c0730c84376 (diff)
parent698862519de6b364da6c20a97d8c546204e80f3d (diff)
downloadnextcloud-server-30330b4343b5bca82b95d9df4a13651c8e91063d.tar.gz
nextcloud-server-30330b4343b5bca82b95d9df4a13651c8e91063d.zip
Merge branch 'master' into move-storages
Conflicts: tests/lib/files/view.php
Diffstat (limited to 'lib/files/view.php')
-rw-r--r--lib/files/view.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/files/view.php b/lib/files/view.php
index d0d473766cc..168d781d62c 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -251,8 +251,11 @@ class View {
if (!$this->file_exists($path)) {
$hooks[] = 'write';
}
-
- return $this->basicOperation('touch', $path, $hooks, $mtime);
+ $result = $this->basicOperation('touch', $path, $hooks, $mtime);
+ if (!$result) { //if native touch fails, we emulate it by changing the mtime in the cache
+ $this->putFileInfo($path, array('mtime' => $mtime));
+ }
+ return true;
}
public function file_get_contents($path) {