summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-04-07 22:20:44 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-04-07 22:28:16 +0200
commit3587c88fe946196af009d02db7c7d5e2c8934fe9 (patch)
treea18ce4f6cb6acd08f082cb365f42f25a4b691c21 /lib
parentbe9bc2c727e59ced01f86bc1781ac586f92bc29f (diff)
parent089052b13af7a5e27d225ab345616511f4eaf2a9 (diff)
downloadnextcloud-server-3587c88fe946196af009d02db7c7d5e2c8934fe9.tar.gz
nextcloud-server-3587c88fe946196af009d02db7c7d5e2c8934fe9.zip
Merge branch 'master' of https://github.com/lukepolo/core-1 into lukepolo-master
Conflicts: apps/files/js/file-upload.js
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/view.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 94be7114865..0dce90aec4d 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -629,10 +629,21 @@ class View {
}
public function fromTmpFile($tmpFile, $path) {
+
if (Filesystem::isValidPath($path)) {
+
+ // Get directory that the file is going into
+ $file_path = \OC_User::getHome(\OC_User::getUser()) . '/files'.substr($path, 0, strrpos($path,'/'));
+
+ // Create the directories if any
+ if(empty($file_path) === false) {
+ mkdir($file_path, 0770, true);
+ }
+
if (!$tmpFile) {
debug_print_backtrace();
}
+
$source = fopen($tmpFile, 'r');
if ($source) {
$this->file_put_contents($path, $source);