Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Filesystem] rename() throws RuntimeException on error (fixes #3848).

  • Loading branch information...
commit 4573f17e0143fc365202a3bdf87140f713068466 1 parent 492c097
@alessandro1997 alessandro1997 authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 Filesystem.php
View
4 Filesystem.php
@@ -136,7 +136,9 @@ public function rename($origin, $target)
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));
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.