{"record":{"id":"1056d84ff7831286","repo":"Leantime/leantime","slug":"skipping-file-file-is-less-than-24-hours-old","errorCode":null,"errorMessage":"Skipping {$file} - file is less than 24 hours old","messagePattern":"Skipping (.+?) - file is less than 24 hours old","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/Command/CleanupOrphanedFilesCommand.php","lineNumber":102,"sourceCode":"\n            $this->info('Found '.count($orphanedFiles).\" orphaned files in {$disk} storage.\");\n\n            $deletedCount = 0;\n            foreach ($orphanedFiles as $file) {\n                // Skip system files and directories\n                if (in_array(basename($file), ['.gitignore', '.htaccess', 'index.html'])) {\n                    continue;\n                }\n\n                $this->line(\"Processing: {$file}\");\n\n                // Check file age (only delete files older than 24 hours)\n                try {\n                    $lastModified = $storage->lastModified($file);\n                    $fileAge = time() - $lastModified;\n\n                    if ($fileAge < 86400) { // 24 hours\n                        $this->warn(\"Skipping {$file} - file is less than 24 hours old\");\n\n                        continue;\n                    }\n\n                    if (! $dryRun) {\n                        if ($storage->delete($file)) {\n                            $this->info(\"Deleted: {$file}\");\n                            $deletedCount++;\n                        } else {\n                            $this->error(\"Failed to delete: {$file}\");\n                        }\n                    } else {\n                        $this->info(\"Would delete: {$file} (dry run)\");\n                        $deletedCount++;\n                    }\n                } catch (\\Exception $e) {\n                    $this->error(\"Error processing {$file}: \".$e->getMessage());\n                    Log::error('Error in orphaned files cleanup: '.$e->getMessage(), [","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/Leantime/leantime/blob/9a9f49f1008f4782b30f6723c54228f4f992e636/app/Command/CleanupOrphanedFilesCommand.php#L84-L120","documentation":"Error \"Skipping {$file} - file is less than 24 hours old\" thrown in Leantime/leantime.","triggerScenarios":"Thrown at app/Command/CleanupOrphanedFilesCommand.php:102 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9a9f49f1008f4782b30f6723c54228f4f992e636","analyzedAt":"2026-08-21T02:37:38.966Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}