Cast file id's to int so we can compare them properly

This commit is contained in:
Robin Appelman 2014-08-13 18:06:28 +02:00
parent 54491e8c68
commit bba59bf815
2 changed files with 3 additions and 2 deletions

View File

@ -48,10 +48,10 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
/** /**
* get file cache of the shared item source * get file cache of the shared item source
* @return string * @return int
*/ */
public function getSourceId() { public function getSourceId() {
return $this->share['file_source']; return (int) $this->share['file_source'];
} }
/** /**

View File

@ -1182,6 +1182,7 @@ class View {
* @return string|null * @return string|null
*/ */
public function getPath($id) { public function getPath($id) {
$id = (int) $id;
$manager = Filesystem::getMountManager(); $manager = Filesystem::getMountManager();
$mounts = $manager->findIn($this->fakeRoot); $mounts = $manager->findIn($this->fakeRoot);
$mounts[] = $manager->find($this->fakeRoot); $mounts[] = $manager->find($this->fakeRoot);