From e2190cee2593b3c99ba4ce533f92f3457f43f047 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 6 Jun 2016 13:59:45 +0200 Subject: [PATCH] fix EGroupware\Api\Vfs\Sqlfs\StreamWrapper::mkdir('sqlfs://default/home/*****',56,8) already exist! --- api/src/Vfs/Hooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Vfs/Hooks.php b/api/src/Vfs/Hooks.php index 010c306fc9..7a25edad8a 100644 --- a/api/src/Vfs/Hooks.php +++ b/api/src/Vfs/Hooks.php @@ -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!