Skip to content

Conversation

@juliusknorr
Copy link
Member

Similar to #32662 but catches other cases where a job might leave temp files around which would otherwise only get cleaned up an hour later by the initial cleanOld call:

$cutOfTime = time() - 3600;
$files = [];
$dh = opendir($this->tmpBaseDir);
if ($dh) {
while (($file = readdir($dh)) !== false) {
if (substr($file, 0, 7) === self::TMP_PREFIX) {
$path = $this->tmpBaseDir . '/' . $file;
$mtime = filemtime($path);
if ($mtime < $cutOfTime) {
$files[] = $path;
}
}
}
}
return $files;

@juliusknorr juliusknorr added bug 3. to review Waiting for reviews labels May 30, 2022
@juliusknorr juliusknorr requested review from a team, ArtificialOwl, CarlSchwan and come-nc and removed request for a team May 30, 2022 16:04
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81
Copy link
Member

test failure unrelated

@PVince81 PVince81 merged commit cf9d0b1 into master May 31, 2022
@PVince81 PVince81 deleted the bugfix/noid/temp-cron branch May 31, 2022 07:19
@PVince81
Copy link
Member

/backport to stable24

@PVince81
Copy link
Member

/backport to stable23

@PVince81
Copy link
Member

/backport to stable22

@backportbot-nextcloud
Copy link

The backport to stable24 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable22 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable23 failed. Please do this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants