Skip to content

Commit

Permalink
implement specific rename handling for SMB
Browse files Browse the repository at this point in the history
  • Loading branch information
blizzz committed Apr 7, 2016
1 parent 6eefea1 commit afd2f56
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions apps/files_external/lib/smb.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,21 @@ public function unlink($path) {
}
}

/**
* @param string $path1 the old name
* @param string $path2 the new name
* @return bool
*/
public function rename($path1, $path2) {
$this->remove($path2);
$path1 = $this->buildPath($path1);
$path2 = $this->buildPath($path2);
$result = $this->share->rename($path1, $path2);

// non-native Share implementation does not return bool in fact
return is_bool($result) ? $result : true;
}

/**
* check if a file or folder has been updated since $time
*
Expand Down

0 comments on commit afd2f56

Please sign in to comment.