Skip to content

Commit

Permalink
Merge branch '16.0' of [email protected]:Dolibarr/dolibarr.git into 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 12, 2024
2 parents e7e96f6 + d17890f commit 65e5899
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions htdocs/core/class/conf.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public function __construct()
$this->mailing = new stdClass();
$this->expensereport = new stdClass();
$this->productbatch = new stdClass();
$this->api = new stdClass();
}

/**
Expand Down
8 changes: 7 additions & 1 deletion htdocs/core/class/utils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ public function purgeFiles($choices = 'tempfilesold+logfiles', $nbsecondsold = 8

$result = dol_delete_dir_recursive($filesarray[$key]['fullname'], $startcount, 1, 0, $tmpcountdeleted);

if (!in_array($filesarray[$key]['fullname'], array($conf->api->dir_temp, $conf->user->dir_temp))) { // The 2 directories $conf->api->dir_temp and $conf->user->dir_temp are recreated at end, so we do not count them
$recreatedDirs = array($conf->user->dir_temp);

if (isModEnabled('api')) {
$recreatedDirs[] = $conf->api->dir_temp;
}

if (!in_array($filesarray[$key]['fullname'], $recreatedDirs)) { // The 2 directories $conf->api->dir_temp and $conf->user->dir_temp are recreated at end, so we do not count them
$count += $result;
$countdeleted += $tmpcountdeleted;
}
Expand Down

0 comments on commit 65e5899

Please sign in to comment.