mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -646,7 +646,7 @@ public class Ftp extends AbstractFtp {
|
||||
|
||||
if (false == ftpFile.isDirectory()) {
|
||||
// 本地不存在文件或者ftp上文件有修改则下载
|
||||
if (false == FileUtil.exist(destFile)
|
||||
if (false == FileUtil.exists(destFile)
|
||||
|| (ftpFile.getTimestamp().getTimeInMillis() > destFile.lastModified())) {
|
||||
download(srcFile, destFile);
|
||||
}
|
||||
|
@@ -478,7 +478,7 @@ public class Sftp extends AbstractFtp {
|
||||
* @since 5.7.6
|
||||
*/
|
||||
public void upload(final String remotePath, final File file) {
|
||||
if (false == FileUtil.exist(file)) {
|
||||
if (false == FileUtil.exists(file)) {
|
||||
return;
|
||||
}
|
||||
if (file.isDirectory()) {
|
||||
@@ -624,7 +624,7 @@ public class Sftp extends AbstractFtp {
|
||||
|
||||
if (false == item.getAttrs().isDir()) {
|
||||
// 本地不存在文件或者ftp上文件有修改则下载
|
||||
if (false == FileUtil.exist(destFile)
|
||||
if (false == FileUtil.exists(destFile)
|
||||
|| (item.getAttrs().getMTime() > (destFile.lastModified() / 1000))) {
|
||||
download(srcFile, destFile);
|
||||
}
|
||||
|
Reference in New Issue
Block a user