summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-11-26 14:13:23 +0100
committerArthur Schiwon <blizzz@owncloud.com>2012-11-26 14:35:13 +0100
commit74cf3b5dfb4c56074672850230ddb97cbb07675b (patch)
treefe113e0fc512c0deb0638857ea2b0debf6303bb2 /apps/files
parent4c707d1b1f970556e24107f28750ad8b4069c7e4 (diff)
downloadnextcloud-server-74cf3b5dfb4c56074672850230ddb97cbb07675b.tar.gz
nextcloud-server-74cf3b5dfb4c56074672850230ddb97cbb07675b.zip
use normalizePath to have a proper target path
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/ajax/newfile.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index 411654af606..2bac9bb20ba 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -65,9 +65,7 @@ if($source) {
$target=$dir.'/'.$filename;
$result=OC_Filesystem::file_put_contents($target, $sourceStream);
if($result) {
- if($target[0] != '/') {
- $target = '/'.$target;
- }
+ $target = OC_Filesystem::normalizePath($target);
$meta = OC_FileCache::get($target);
$mime=$meta['mimetype'];
$id = OC_FileCache::getId($target);