use normalizePath to have a proper target path
This commit is contained in:
parent
88516dd8ae
commit
34937479a8
|
@ -65,9 +65,7 @@ if($source) {
|
||||||
$target=$dir.'/'.$filename;
|
$target=$dir.'/'.$filename;
|
||||||
$result=OC_Filesystem::file_put_contents($target, $sourceStream);
|
$result=OC_Filesystem::file_put_contents($target, $sourceStream);
|
||||||
if($result) {
|
if($result) {
|
||||||
if($target[0] != '/') {
|
$target = OC_Filesystem::normalizePath($target);
|
||||||
$target = '/'.$target;
|
|
||||||
}
|
|
||||||
$meta = OC_FileCache::get($target);
|
$meta = OC_FileCache::get($target);
|
||||||
$mime=$meta['mimetype'];
|
$mime=$meta['mimetype'];
|
||||||
$id = OC_FileCache::getId($target);
|
$id = OC_FileCache::getId($target);
|
||||||
|
|
Loading…
Reference in New Issue