]> source.dussan.org Git - nextcloud-server.git/commitdiff
create uploads directory for ssl certificates if it didn't exists
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 9 Jul 2012 16:11:29 +0000 (18:11 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 9 Jul 2012 16:11:29 +0000 (18:11 +0200)
apps/files_external/ajax/addRootCertificate.php

index c5f49a82d365c8994a7754899b4938744707aa9f..d28a7d24b2d951040bd2ad10582e12cc984ffb2a 100644 (file)
@@ -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);