Skip to content

Commit 89834bf

Browse files
committed
Better renaming
1 parent aaa58c9 commit 89834bf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/FireFS/FireFS.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
namespace ElementaryFramework\FireFS;
3434

35-
3635
/**
3736
* FireFS - Filesystem Manager Class
3837
*
@@ -566,15 +565,15 @@ public function mkdir(string $path, bool $recursive = false): bool
566565
* Rename the file
567566
*
568567
* @param string $path The current path of the file
569-
* @param string $new_path The new path of the file
568+
* @param string $new_name The new name of the file
570569
*
571570
* @throws \RuntimeException
572571
*
573572
* @return boolean
574573
*/
575-
public function rename(string $path, string $new_path): bool
574+
public function rename(string $path, string $new_name): bool
576575
{
577-
return $this->move($path, $new_path);
576+
return $this->move($path, $this->makePath(array($this->dirname($path), $new_name)));
578577
}
579578

580579
/**

0 commit comments

Comments
 (0)