diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-07 22:20:44 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-07 22:28:16 +0200 |
commit | 3587c88fe946196af009d02db7c7d5e2c8934fe9 (patch) | |
tree | a18ce4f6cb6acd08f082cb365f42f25a4b691c21 /lib | |
parent | be9bc2c727e59ced01f86bc1781ac586f92bc29f (diff) | |
parent | 089052b13af7a5e27d225ab345616511f4eaf2a9 (diff) | |
download | nextcloud-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.php | 11 |
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); |