diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-20 12:36:20 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-20 12:36:20 -0400 |
commit | ceae4fa7b45db51313cb78fd7441e8b3e99221f9 (patch) | |
tree | 386ab2e8d1d2e0846761ed6ab9fcc2cfcb613bbe /apps/files_sharing | |
parent | b05be2f26d9f4d75e22839eb440b9fddaea14eb4 (diff) | |
download | nextcloud-server-ceae4fa7b45db51313cb78fd7441e8b3e99221f9.tar.gz nextcloud-server-ceae4fa7b45db51313cb78fd7441e8b3e99221f9.zip |
Fix bugs preventing file upload in shared folders with write permission
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/sharedstorage.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php index e2147bea492..afe173ad0cc 100644 --- a/apps/files_sharing/sharedstorage.php +++ b/apps/files_sharing/sharedstorage.php @@ -494,11 +494,15 @@ class OC_Filestorage_Shared extends OC_Filestorage { } } - public function fromUploadedFile($tmpPath, $path) { - $source = $this->getSource($tmpPath); - if ($source) { - $storage = OC_Filesystem::getStorage($source); - return $storage->fromUploadedFile($this->getInternalPath($source), $path); + public function fromUploadedFile($tmpFile, $path) { + if ($this->is_writeable($path)) { + $source = $this->getSource($path); + if ($source) { + $storage = OC_Filesystem::getStorage($source); + return $storage->fromUploadedFile($tmpFile, $this->getInternalPath($source)); + } + } else { + return false; } } |