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