mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
make sure path starts with /
This commit is contained in:
parent
7892204077
commit
fdc7a8b204
1 changed files with 3 additions and 0 deletions
|
|
@ -65,6 +65,9 @@ if($source) {
|
|||
$target=$dir.'/'.$filename;
|
||||
$result=OC_Filesystem::file_put_contents($target, $sourceStream);
|
||||
if($result) {
|
||||
if($target[0] != '/') {
|
||||
$target = '/'.$target;
|
||||
}
|
||||
$meta = OC_FileCache::get($target);
|
||||
$mime=$meta['mimetype'];
|
||||
$id = OC_FileCache::getId($target);
|
||||
|
|
|
|||
Loading…
Reference in a new issue