aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/ajax
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-07-09 18:11:29 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-07-09 18:11:29 +0200
commit43f00a2dc85b4d7ceba8e7a13941b0deb409b842 (patch)
tree3a903874333864fd9e3168284fb6e53cc3aca79c /apps/files_external/ajax
parente59a1806cf676dad9256ad3adb83a6e9530b7612 (diff)
downloadnextcloud-server-43f00a2dc85b4d7ceba8e7a13941b0deb409b842.tar.gz
nextcloud-server-43f00a2dc85b4d7ceba8e7a13941b0deb409b842.zip
create uploads directory for ssl certificates if it didn't exists
Diffstat (limited to 'apps/files_external/ajax')
-rw-r--r--apps/files_external/ajax/addRootCertificate.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
index c5f49a82d36..d28a7d24b2d 100644
--- a/apps/files_external/ajax/addRootCertificate.php
+++ b/apps/files_external/ajax/addRootCertificate.php
@@ -5,6 +5,7 @@ OCP\JSON::checkAppEnabled('files_external');
$view = \OCP\Files::getStorage("files_external");
$from = $_FILES['rootcert_import']['tmp_name'];
$path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/';
+if(!file_exists($path)) mkdir($path,0700,true);
$to = $path.$_FILES['rootcert_import']['name'];
move_uploaded_file($from, $to);