mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
fixed a bug of movefile function on filehandler class
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10190 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
270a9aeb86
commit
ecf2f74c41
1 changed files with 6 additions and 1 deletions
|
|
@ -148,7 +148,12 @@ class FileHandler {
|
||||||
*/
|
*/
|
||||||
function moveFile($source, $target) {
|
function moveFile($source, $target) {
|
||||||
$source = FileHandler::getRealPath($source);
|
$source = FileHandler::getRealPath($source);
|
||||||
return (file_exists($source) && FileHandler::removeFile($target) && FileHandler::rename($source, $target));
|
if(!file_exists($source))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
FileHandler::removeFile($target);
|
||||||
|
return FileHandler::rename($source, $target));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue