use normalizePath to have a proper target path

This commit is contained in:
Arthur Schiwon 2012-11-26 14:13:23 +01:00
parent 4c707d1b1f
commit 74cf3b5dfb
1 changed files with 1 additions and 3 deletions

View File

@ -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);