mirror of
https://github.com/getgrav/grav.git
synced 2026-03-04 11:31:43 +01:00
Fix #635 use mv instead of rename as that does not support cross volume operations
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed case where extracting a package would cause an error during rename
|
||||
* Fixed [#635](https://github.com/getgrav/grav/issues/635) use mv instead of rename as that does not support cross volume operations
|
||||
|
||||
# v1.1.9
|
||||
## 12/13/2016
|
||||
|
||||
@@ -340,11 +340,13 @@ abstract class Folder
|
||||
// Make sure that path to the target exists before moving.
|
||||
self::create(dirname($target));
|
||||
|
||||
// Just rename the directory.
|
||||
$success = @rename($source, $target);
|
||||
error_clear_last();
|
||||
|
||||
if (!$success) {
|
||||
$error = error_get_last();
|
||||
// Just rename the directory.
|
||||
exec("mv $source $target");
|
||||
|
||||
$error = error_get_last();
|
||||
if ($error) {
|
||||
throw new \RuntimeException($error['message']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user