aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/ajax')
-rw-r--r--apps/files/ajax/upload.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index 4d5dc84e9c7..debdf26ffdf 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -83,6 +83,10 @@ if (empty($_POST['dirToken'])) {
// The token defines the target directory (security reasons)
$path = \OC\Files\Filesystem::getPath($linkItem['file_source']);
+ if($path === null) {
+ OCP\JSON::error(array('data' => array_merge(array('message' => $l->t('Unable to set upload directory.')))));
+ die();
+ }
$dir = sprintf(
"/%s/%s",
$path,