N°7803 - MTP from itophub/designer failing in itop 3.2.0

This commit is contained in:
Eric Espie
2024-12-16 16:44:59 +01:00
parent 8647a76dbf
commit 32ef639ce1
5 changed files with 48 additions and 15 deletions

View File

@@ -790,15 +790,16 @@ class SetupUtils
// avoid unnecessary warning
// Try 100 times...
$i = 100;
while ((@rmdir($dir) === false) && $i > 0)
{
while ((@rmdir($dir) === false) && $i > 0) {
// Magic trick for windows
// sometimes the folder is empty but rmdir fails
closedir(opendir($dir));
$oDir = opendir($dir);
if ($oDir !== false) {
closedir($oDir);
}
$i--;
}
if ($i == 0)
{
if ($i == 0) {
rmdir($dir);
}
}