summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-06-03 13:35:27 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2016-06-09 13:59:58 +0200
commit18f7cede51886aba3330464087bfcb88a58b9cd5 (patch)
treeca7565e2f0566262aec0b84cf4225a1b558d15e9 /lib
parentf4831f4074f94beeed9330eb6039e4be9a0e5651 (diff)
downloadnextcloud-server-18f7cede51886aba3330464087bfcb88a58b9cd5.tar.gz
nextcloud-server-18f7cede51886aba3330464087bfcb88a58b9cd5.zip
Fix warnings when trying to get mtime of non existing files
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Local.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index b07e26a3358..acd4c3b4838 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -157,7 +157,7 @@ class Local extends \OC\Files\Storage\Common {
public function filemtime($path) {
clearstatcache($this->getSourcePath($path));
- return filemtime($this->getSourcePath($path));
+ return $this->file_exists($path) ? filemtime($this->getSourcePath($path)) : false;
}
public function touch($path, $mtime = null) {
@@ -188,7 +188,7 @@ class Local extends \OC\Files\Storage\Common {
return '';
}
- $handle = fopen($fileName,'rb');
+ $handle = fopen($fileName, 'rb');
$content = fread($handle, $fileSize);
fclose($handle);
return $content;
@@ -377,7 +377,7 @@ class Local extends \OC\Files\Storage\Common {
* @return bool
*/
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
- if($sourceStorage->instanceOfStorage('\OC\Files\Storage\Local')){
+ if ($sourceStorage->instanceOfStorage('\OC\Files\Storage\Local')) {
/**
* @var \OC\Files\Storage\Local $sourceStorage
*/