make sure that path is not 'false'
This commit is contained in:
parent
33cdd93890
commit
d4085d8148
2 changed files with 4 additions and 6 deletions
|
@ -169,9 +169,8 @@ class Shared_Cache extends Cache {
|
|||
* @return int file id
|
||||
*/
|
||||
public function put($file, array $data) {
|
||||
if ($file === '' && isset($data['etag'])) {
|
||||
return \OCP\Config::setUserValue(\OCP\User::getUser(), 'files_sharing', 'etag', $data['etag']);
|
||||
} else if ($cache = $this->getSourceCache($file)) {
|
||||
$file = ($file === false) ? '' : $file;
|
||||
if ($cache = $this->getSourceCache($file)) {
|
||||
return $cache->put($this->files[$file], $data);
|
||||
}
|
||||
return false;
|
||||
|
@ -368,6 +367,7 @@ class Shared_Cache extends Cache {
|
|||
* @return int
|
||||
*/
|
||||
public function calculateFolderSize($path, $entry = null) {
|
||||
$path = ($path === false) ? '' : $path;
|
||||
if ($cache = $this->getSourceCache($path)) {
|
||||
return $cache->calculateFolderSize($this->files[$path]);
|
||||
}
|
||||
|
|
|
@ -272,9 +272,7 @@ class Shared extends \OC\Files\Storage\Common {
|
|||
|
||||
public function unlink($path) {
|
||||
// Delete the file if DELETE permission is granted
|
||||
if ($path == '') {
|
||||
$path = $this->mountPoint;
|
||||
}
|
||||
$path = ($path === false) ? '' : $path;
|
||||
if ($source = $this->getSourcePath($path)) {
|
||||
if ($this->isDeletable($path)) {
|
||||
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source);
|
||||
|
|
Loading…
Reference in a new issue