8000 [HttpKernel] [Filesystem::mirror] symlinked directory contents are not copied · Issue #2436 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] [Filesystem::mirror] symlinked directory contents are not copied #2436

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
jonathaningram opened this issue Oct 20, 2011 · 0 comments

Comments

@jonathaningram
Copy link
Contributor

I believe this is a bug. Basically, the code is as follows:

if (is_dir($file)) {
    $this->mkdir($target);
} else if (is_file($file)) {
    $this->copy($file, $target, $options);
} else if (is_link($file)) {
    $this->symlink($file, $target);
} else {
    throw new \RuntimeException(sprintf('Unable to guess "%s" file type.', $file));
}

Because it checks for is_dir first, if a directory is a symbolic link, it will get its dir made, but not its contents.

It should check for is_link first, no?

fabpot added a commit that referenced this issue Oct 25, 2011
Commits
-------

6343bef [HttpKernel] Updated mirror method to check for symlinks before dirs and files

Discussion
----------

[HttpKernel] Updated mirror method to check for symlinks before dirs and files

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2436
@fabpot fabpot closed this as completed Oct 25, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0