Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Prevent error because of too long paths #15547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Make sure old cache dir is not equal to real cache dir
  • Loading branch information
wouterj committed Sep 19, 2015
commit d107e2487f56c24338ec3b089db4dcd958a675ac
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$realCacheDir = $this->getContainer()->getParameter('kernel.cache_dir');
$oldCacheDir = substr($realCacheDir, 0, -1).'_';
Copy link
Contributor

Choose a reason for hiding this comment

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

This will break if the real cache dir is already suffixed with _. So we need to make sure it's really different.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

you can move this to an else below to save one substr call in the if case

if ('_' === substr($realCacheDir, -1)) {
$oldCacheDir = substr($realCacheDir, 0, -1).'-';
}
$filesystem = $this->getContainer()->get('filesystem');

if (!is_writable($realCacheDir)) {
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.