fix EGroupware\Api\Vfs\Sqlfs\StreamWrapper::mkdir('sqlfs://default/home/*****',56,8) already exist!

This commit is contained in:
Ralf Becker 2016-06-06 13:59:45 +02:00
parent 89fcf7e844
commit e2190cee25

View File

@ -45,7 +45,7 @@ class Hooks
if (self::LOG_LEVEL > 0) error_log(__METHOD__.'('.array2string($data).')');
// create a user-dir
Api\Vfs::$is_root = true;
if (Api\Vfs::mkdir($dir='/home/'.$data['account_lid'],0700,0))
if (Api\Vfs::file_exists($dir='/home/'.$data['account_lid']) || Api\Vfs::mkdir($dir, 0700, 0))
{
Api\Vfs::chown($dir,$data['account_id']);
Api\Vfs::chgrp($dir,0);
@ -124,7 +124,7 @@ class Hooks
// create a group-dir
Api\Vfs::$is_root = true;
if (Api\Vfs::mkdir($dir='/home/'.$data['account_lid'],0070,0))
if (Api\Vfs::file_exists($dir='/home/'.$data['account_lid']) || Api\Vfs::mkdir($dir, 0070, 0))
{
Api\Vfs::chown($dir,0);
Api\Vfs::chgrp($dir,abs($data['account_id'])); // gid in Vfs is positiv!