make sure path starts with /

This commit is contained in:
Arthur Schiwon 2012-11-15 18:25:31 +01:00
parent 7892204077
commit fdc7a8b204
1 changed files with 3 additions and 0 deletions

View File

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