merged branch stloyd/bugfix/fix_regression (PR #7944)

This PR was merged into the 2.1 branch.

Discussion
----------

[Filesystem] Fix regression introduced in 10dea94

This is one of ideas to fix the regression from 10dea948, @kachkaev what do you think?

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature? | no
| Tests pass?  | yes
| Fixed tickets | #7920
| License       | MIT

Commits
-------

e4913f8 [Filesystem] Fix regression introduced in 10dea948
This commit is contained in:
Fabien Potencier 2013-05-06 12:30:15 +02:00
commit 991829ca52

View File

@ -35,7 +35,7 @@ class Filesystem
*/
public function copy($originFile, $targetFile, $override = false)
{
if (!is_file($originFile)) {
if (stream_is_local($originFile) && !is_file($originFile)) {
throw new IOException(sprintf('Failed to copy %s because file not exists', $originFile));
}