1
0
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:
Awilum
2020-06-25 21:02:56 +03:00
parent 149324d63a
commit 8be78d7939

View File

@@ -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;
}