File tree Expand file tree Collapse file tree 2 files changed +9
-15
lines changed Expand file tree Collapse file tree 2 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -1108,14 +1108,13 @@ function addDailyChanges(int $projectid): void
1108
1108
' , [$ projectid , $ date ]);
1109
1109
1110
1110
// Clean the backup directories.
1111
- $ timeframe = config ('cdash.backup_timeframe ' );
1111
+ $ deletion_time_threshold = time () - ( int ) config ('cdash.backup_timeframe ' ) * 3600 ;
1112
1112
$ dirs_to_clean = ['parsed ' , 'failed ' , 'inprogress ' ];
1113
1113
foreach ($ dirs_to_clean as $ dir_to_clean ) {
1114
1114
$ files = Storage::allFiles ($ dir_to_clean );
1115
- foreach ($ files as $ filename ) {
1116
- $ filepath = Storage::path ($ filename );
1117
- if (file_exists ($ filepath ) && is_file ($ filepath ) && time () - filemtime ($ filepath ) > $ timeframe * 3600 ) {
1118
- Storage::delete ($ filepath );
1115
+ foreach ($ files as $ file ) {
1116
+ if (Storage::lastModified ($ file ) < $ deletion_time_threshold ) {
1117
+ Storage::delete ($ file );
1119
1118
}
1120
1119
}
1121
1120
}
Original file line number Diff line number Diff line change @@ -14027,11 +14027,6 @@ parameters:
14027
14027
count: 3
14028
14028
path: app/cdash/include/dailyupdates.php
14029
14029
14030
- -
14031
- message: "#^Binary operation \"\\*\" between mixed and 3600 results in an error\\.$#"
14032
- count: 1
14033
- path: app/cdash/include/dailyupdates.php
14034
-
14035
14030
-
14036
14031
message: """
14037
14032
#^Call to deprecated function add_last_sql_error\\(\\)\\:
@@ -14107,6 +14102,11 @@ parameters:
14107
14102
count: 1
14108
14103
path: app/cdash/include/dailyupdates.php
14109
14104
14105
+ -
14106
+ message: "#^Cannot cast mixed to int\\.$#"
14107
+ count: 1
14108
+ path: app/cdash/include/dailyupdates.php
14109
+
14110
14110
-
14111
14111
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
14112
14112
count: 5
@@ -14327,11 +14327,6 @@ parameters:
14327
14327
count: 2
14328
14328
path: app/cdash/include/dailyupdates.php
14329
14329
14330
- -
14331
- message: "#^Only numeric types are allowed in \\-, int\\|false given on the right side\\.$#"
14332
- count: 1
14333
- path: app/cdash/include/dailyupdates.php
14334
-
14335
14330
-
14336
14331
message: "#^Parameter \\#1 \\$datetime of function strtotime expects string, string\\|null given\\.$#"
14337
14332
count: 1
You can’t perform that action at this time.
0 commit comments