Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix rename()
Browse files Browse the repository at this point in the history
Return true or false
  • Loading branch information
c12simple committed Oct 13, 2014
1 parent 4afdae6 commit 8388953
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/plugins/access.smb/smb.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,10 @@ public function rename ($url_from, $url_to)
trigger_error('rename(): error in URL', E_USER_ERROR);
}
smb::clearstatcache ($url_from);
return smb::execute ('rename "'.$from['path'].'" "'.$to['path'].'"', $to);
$res = smb::execute ('rename "'.$from['path'].'" "'.$to['path'].'"', $to);
if(empty($res)) return true;
AJXP_Logger::info(__CLASS__, "SmbClient rename error: ".$res);
return false;
}

public function mkdir ($url, $mode, $options)
Expand Down

0 comments on commit 8388953

Please sign in to comment.