summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-04-07 23:17:35 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-04-07 23:17:35 +0200
commit7dd00746556aa4be26e41a6f3b66095a29b02c45 (patch)
tree53e367c01f4720f7abd8680fb7909eda056957ce
parentd15a4719d2bc58827d7cbe616ab25aaf376c8293 (diff)
downloadnextcloud-server-7dd00746556aa4be26e41a6f3b66095a29b02c45.tar.gz
nextcloud-server-7dd00746556aa4be26e41a6f3b66095a29b02c45.zip
fixing mkdir code to respect external file systems as well
-rw-r--r--lib/private/files/view.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 0dce90aec4d..519ed250b1f 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -633,11 +633,11 @@ class View {
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,'/'));
+ $filePath = dirname($path);
// Create the directories if any
- if(empty($file_path) === false) {
- mkdir($file_path, 0770, true);
+ if (!$this->file_exists($filePath)) {
+ $this->mkdir($filePath);
}
if (!$tmpFile) {