diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-15 21:39:32 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-15 21:39:32 +0200 |
commit | 8bc7174bdca5ae7f4ea71eeb7daec56fb262a263 (patch) | |
tree | ba24da220070eb95a57708e54f2e1b4b180b3983 /lib/private/files | |
parent | 7f4fefd7ad668086dde57ac7f13ed5d7b12ef862 (diff) | |
parent | 83e8981e246384de3b9d206a5dcf1109ce421005 (diff) | |
download | nextcloud-server-8bc7174bdca5ae7f4ea71eeb7daec56fb262a263.tar.gz nextcloud-server-8bc7174bdca5ae7f4ea71eeb7daec56fb262a263.zip |
Merge pull request #8104 from owncloud/lukepolo-master
Added the ability to Drag and Drop folders [chrome]
Diffstat (limited to 'lib/private/files')
-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..519ed250b1f 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 + $filePath = dirname($path); + + // Create the directories if any + if (!$this->file_exists($filePath)) { + $this->mkdir($filePath); + } + if (!$tmpFile) { debug_print_backtrace(); } + $source = fopen($tmpFile, 'r'); if ($source) { $this->file_put_contents($path, $source); |