This commit is contained in:
Looly
2023-03-20 22:53:25 +08:00
parent 6060772c32
commit 248af7e2bc
6 changed files with 35 additions and 55 deletions

View File

@@ -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);
}

View File

@@ -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);
}