diff options
Diffstat (limited to 'lib/files')
-rw-r--r-- | lib/files/cache/cache.php | 4 | ||||
-rw-r--r-- | lib/files/filesystem.php | 5 | ||||
-rw-r--r-- | lib/files/storage/local.php | 3 | ||||
-rw-r--r-- | lib/files/view.php | 1 |
4 files changed, 9 insertions, 4 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index 91bcb73a55d..71b70abe3fe 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -343,9 +343,9 @@ class Cache { $query->execute(array($targetPath, md5($targetPath), $child['fileid'])); } - $query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ?, `parent` =?' + $query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ?, `name` = ?, `parent` =?' . ' WHERE `fileid` = ?'); - $query->execute(array($target, md5($target), $newParentId, $sourceId)); + $query->execute(array($target, md5($target), basename($target), $newParentId, $sourceId)); } /** diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php index 1580dfaf637..6f56de9f265 100644 --- a/lib/files/filesystem.php +++ b/lib/files/filesystem.php @@ -621,10 +621,11 @@ class Filesystem { * get the content of a directory * * @param string $directory path under datadirectory + * @param string $mimetype_filter limit returned content to this mimetype or mimepart * @return array */ - public static function getDirectoryContent($directory) { - return self::$defaultInstance->getDirectoryContent($directory); + public static function getDirectoryContent($directory, $mimetype_filter = '') { + return self::$defaultInstance->getDirectoryContent($directory, $mimetype_filter); } /** diff --git a/lib/files/storage/local.php b/lib/files/storage/local.php index 7b637a97059..81e32587fca 100644 --- a/lib/files/storage/local.php +++ b/lib/files/storage/local.php @@ -95,6 +95,9 @@ class Local extends \OC\Files\Storage\Common{ // sets the modification time of the file to the given value. // If mtime is nil the current time is set. // note that the access time of the file always changes to the current time. + if($this->file_exists($path) and !$this->isUpdatable($path)) { + return false; + } if(!is_null($mtime)) { $result=touch( $this->datadir.$path, $mtime ); }else{ diff --git a/lib/files/view.php b/lib/files/view.php index e811fb093cc..f607bb59aac 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -731,6 +731,7 @@ class View { * get the content of a directory * * @param string $directory path under datadirectory + * @param string $mimetype_filter limit returned content to this mimetype or mimepart * @return array */ public function getDirectoryContent($directory, $mimetype_filter = '') { |