Leantime/leantime · error

Skipping {$file} - file is less than 24 hours old

Error message

Skipping {$file} - file is less than 24 hours old

What it means

Error "Skipping {$file} - file is less than 24 hours old" thrown in Leantime/leantime.

Source

Thrown at app/Command/CleanupOrphanedFilesCommand.php:102

            $this->info('Found '.count($orphanedFiles)." orphaned files in {$disk} storage.");

            $deletedCount = 0;
            foreach ($orphanedFiles as $file) {
                // Skip system files and directories
                if (in_array(basename($file), ['.gitignore', '.htaccess', 'index.html'])) {
                    continue;
                }

                $this->line("Processing: {$file}");

                // Check file age (only delete files older than 24 hours)
                try {
                    $lastModified = $storage->lastModified($file);
                    $fileAge = time() - $lastModified;

                    if ($fileAge < 86400) { // 24 hours
                        $this->warn("Skipping {$file} - file is less than 24 hours old");

                        continue;
                    }

                    if (! $dryRun) {
                        if ($storage->delete($file)) {
                            $this->info("Deleted: {$file}");
                            $deletedCount++;
                        } else {
                            $this->error("Failed to delete: {$file}");
                        }
                    } else {
                        $this->info("Would delete: {$file} (dry run)");
                        $deletedCount++;
                    }
                } catch (\Exception $e) {
                    $this->error("Error processing {$file}: ".$e->getMessage());
                    Log::error('Error in orphaned files cleanup: '.$e->getMessage(), [

View on GitHub (pinned to 9a9f49f100)

When it happens

Trigger: Thrown at app/Command/CleanupOrphanedFilesCommand.php:102 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Leantime/leantime@9a9f49f100 (2026-08-21). Data as JSON: /api/errors/1056d84ff7831286. Report an issue: GitHub.