summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/files/view.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/files/view.php b/lib/files/view.php
index 1a234228eab..69e2f1ad349 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -242,7 +242,11 @@ class View {
if (!is_null($mtime) and !is_numeric($mtime)) {
$mtime = strtotime($mtime);
}
- return $this->basicOperation('touch', $path, array('write'), $mtime);
+ $result = $this->basicOperation('touch', $path, array('write'), $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) {
@@ -917,11 +921,11 @@ class View {
}
/**
- * Get the owner for a file or folder
- *
- * @param string $path
- * @return string
- */
+ * Get the owner for a file or folder
+ *
+ * @param string $path
+ * @return string
+ */
public function getOwner($path) {
return $this->basicOperation('getOwner', $path);
}