Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
e3a3ca0c
Commit
e3a3ca0c
authored
Dec 05, 2019
by
Dominik Hebeler
Browse files
fixed error in cache gc
parent
b504ec20
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/Console/Commands/CacheGC.php
View file @
e3a3ca0c
...
...
@@ -48,11 +48,11 @@ class CacheGC extends Command
}
try
{
$iterator
=
new
\
Recursive
DirectoryIterator
(
$cachedir
)
;
$iterator
->
setFlags
(
\
RecursiveDirectoryIterator
::
SKIP_DOTS
);
$files
=
new
\
RecursiveIteratorIterator
(
$iterator
,
\
RecursiveIteratorIterator
::
SELF_FIRST
)
;
foreach
(
$files
as
$file
)
{
$file
=
realpath
(
$file
);
foreach
(
new
\
DirectoryIterator
(
$cachedir
)
as
$fileInfo
)
{
if
(
$fileInfo
->
isDot
())
{
continue
;
}
$file
=
$fileInfo
->
getPathname
(
);
$basename
=
basename
(
$file
);
if
(
!
is_dir
(
$file
)
&&
$basename
!==
"cache.gc"
&&
$basename
!==
".gitignore"
)
{
$fp
=
fopen
(
$file
,
'r'
);
...
...
@@ -80,5 +80,6 @@ class CacheGC extends Command
}
finally
{
unlink
(
$lockfile
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment