file empty return true

This commit is contained in:
Looly
2021-05-18 18:16:01 +08:00
parent 510ec621a2
commit e5049baa92
2 changed files with 2 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ public class FileUtil extends PathUtil {
* @return 是否为空当提供非目录时返回false
*/
public static boolean isEmpty(File file) {
if (null == file) {
if (null == file || false == file.exists()) {
return true;
}