secure file fix

master
yixian 6 years ago
parent 1178b46859
commit f6eff7bb2e

@ -70,7 +70,7 @@ public class TradeSecureServiceHanyinImpl implements TradeSecureService {
String dateString = file.getTransDate().toString("yyyyMMdd"); String dateString = file.getTransDate().toString("yyyyMMdd");
Vector<ChannelSftp.LsEntry> folders = command.ls("/royalpay"); Vector<ChannelSftp.LsEntry> folders = command.ls("/royalpay");
String dir = "/royalpay/" + dateString; String dir = "/royalpay/" + dateString;
if (folders.parallelStream().noneMatch(entry -> entry.getFilename().equals(dateString))) { if (folders.parallelStream().noneMatch(entry -> entry.getFilename().endsWith(dateString))) {
logger.debug("mk dir:{}", dir); logger.debug("mk dir:{}", dir);
command.mkdir(dir); command.mkdir(dir);
} }

Loading…
Cancel
Save