mirror of
https://github.com/flextype/flextype.git
synced 2025-08-28 15:29:59 +02:00
fix(entries): fix method rename() in Entries API #433
This commit is contained in:
@@ -522,8 +522,8 @@ class Entries
|
||||
*/
|
||||
public function rename(string $id, string $new_id) : bool
|
||||
{
|
||||
if (!Filesystem::has($this->getFileLocation($new_id))) {
|
||||
return rename($this->getFileLocation($id), $this->getFileLocation($new_id));
|
||||
if (!Filesystem::has($this->getDirLocation($new_id))) {
|
||||
return rename($this->getDirLocation($id), $this->getDirLocation($new_id));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user