mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Issue 1974 Check the path and check the file, if it is null, and there is slash on the last character.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10804 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7c3a22d8e7
commit
2296bb56e1
1 changed files with 9 additions and 6 deletions
|
|
@ -542,9 +542,16 @@
|
|||
|
||||
$output = $this->_connect();
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
if(!$this->target_path) $this->target_path = '.';
|
||||
if(substr($this->download_path, -1) == '/')
|
||||
{
|
||||
$this->download_path = substr($this->download_path, 0, -1);
|
||||
}
|
||||
$target_dir = $this->ftp_info->ftp_root_path.$this->target_path;
|
||||
|
||||
foreach($file_list as $k => $file){
|
||||
if(!$file) continue;
|
||||
$org_file = $file;
|
||||
if($this->package->path == ".")
|
||||
{
|
||||
|
|
@ -586,15 +593,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
if(is_file(FileHandler::getRealPath($this->download_path."/".$org_file)))
|
||||
if(!ftp_put($this->connection, $target_dir .'/'. $file, FileHandler::getRealPath($this->download_path."/".$org_file), FTP_BINARY))
|
||||
{
|
||||
if(!ftp_put($this->connection, $target_dir .'/'. $file, FileHandler::getRealPath($this->download_path."/".$org_file), FTP_BINARY))
|
||||
{
|
||||
return new Object(-1, "msg_ftp_upload_failed");
|
||||
}
|
||||
return new Object(-1, "msg_ftp_upload_failed");
|
||||
}
|
||||
}
|
||||
|
||||
$this->_close();
|
||||
return new Object();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue