Issue 1974 Check if it is a file. (When the module update 'XE Core', '/' is not a file but the code try to open the directory as a file. So, before it open the directory, check if it is a file.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10802 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2012-06-28 06:54:27 +00:00
parent 873e014713
commit 78f783252c

View file

@ -586,10 +586,14 @@
}
}
}
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");
}
if(is_file(FileHandler::getRealPath($this->download_path."/".$org_file)))
{
echo FileHandler::getRealPath($this->download_path."/".$org_file);
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");
}
}
}
$this->_close();