Skip to content

Commit

Permalink
Revert "Fix #635 use mv instead of rename as that does not support cr…
Browse files Browse the repository at this point in the history
…oss volume operations"

This reverts commit d61d260.
  • Loading branch information
flaviocopes committed Dec 14, 2016
1 parent d61d260 commit 5b6452d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

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
Expand Down
8 changes: 3 additions & 5 deletions system/src/Grav/Common/Filesystem/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,11 @@ public static function move($source, $target)
// Make sure that path to the target exists before moving.
self::create(dirname($target));

error_clear_last();

// Just rename the directory.
exec("mv $source $target");
$success = @rename($source, $target);

$error = error_get_last();
if ($error) {
if (!$success) {
$error = error_get_last();
throw new \RuntimeException($error['message']);
}

Expand Down

0 comments on commit 5b6452d

Please sign in to comment.