Selaa lähdekoodia

don't return the path if the file doesn't exist

sunyj 8 vuotta sitten
vanhempi
commit
e94575e41c

+ 2 - 1
report/src/main/java/com/uas/report/service/impl/FileServiceImpl.java

@@ -426,7 +426,8 @@ public class FileServiceImpl implements FileService {
 		filePath = getAbsolutePath(filePath, isAbsolutePath);
 		File file = new File(filePath);
 		if (!file.exists()) {
-			throw new FileNotFoundException("文件不存在:" + filePath);
+			logger.error("文件不存在:" + filePath);
+			throw new FileNotFoundException("文件不存在");
 		}
 
 		List<Map<String, Object>> result = new ArrayList<>();