summaryrefslogtreecommitdiffstats
path: root/lib/files/view.php
diff options
context:
space:
mode:
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 bfe7c89b509..a60ab61e8ba 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) {