Browse Source

Verify if path exists

We need to check if the path exists and throw an error instead of handling this situation ungraciously.
remotes/origin/poc-doctrine-migrations
Lukas Reschke 11 years ago
parent
commit
ebb5523698
  1. 4
      apps/files/ajax/upload.php

4
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,

Loading…
Cancel
Save