Merge pull request #10840 from owncloud/issue_10674
Solve bug with touch always return true on /lib/private/files/view.php
This commit is contained in:
commit
523680cef2
2
3rdparty
2
3rdparty
|
@ -1 +1 @@
|
||||||
Subproject commit 82d02dd48ad11312bd740c57720dc84b4d66fa8a
|
Subproject commit 554277edd6155ca3f5b21e32fe16b818d7fb827e
|
|
@ -304,7 +304,13 @@ class View {
|
||||||
$hooks[] = 'write';
|
$hooks[] = 'write';
|
||||||
}
|
}
|
||||||
$result = $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
|
if (!$result) {
|
||||||
|
// If create file fails because of permissions on external storage like SMB folders,
|
||||||
|
// check file exists and return false if not.
|
||||||
|
if(!$this->file_exists($path)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//if native touch fails, we emulate it by changing the mtime in the cache
|
||||||
$this->putFileInfo($path, array('mtime' => $mtime));
|
$this->putFileInfo($path, array('mtime' => $mtime));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue