From 34937479a83d5948280a0d31a9b7c23c20c7ab94 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Mon, 26 Nov 2012 14:13:23 +0100 Subject: [PATCH] use normalizePath to have a proper target path --- apps/files/ajax/newfile.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index abfb3540e4..bb55c90fa6 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);