diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index a63c5a313f..8ddddadcac 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -136,7 +136,9 @@ class Filesystem throw new \RuntimeException(sprintf('Cannot rename because the target "%s" already exist.', $target)); } - rename($origin, $target); + if (false === rename($origin, $target)) { + throw new \RuntimeException(sprintf('Cannot rename "%s" to "%s".', $origin, $target)); + } } /**