修复 cad 格式二级以上压缩包 不自动创建目录问题

pull/248/head
gaoxiongzaq 2023-10-24 11:37:03 +08:00
parent 75061d843a
commit 724db1936b
1 changed files with 7 additions and 0 deletions

View File

@ -327,6 +327,13 @@ public class FileHandlerService implements InitializingBean {
*/ */
public String cadToPdf(String inputFilePath, String outputFilePath ,String cadPreviewType) throws Exception { public String cadToPdf(String inputFilePath, String outputFilePath ,String cadPreviewType) throws Exception {
final InterruptionTokenSource source = new InterruptionTokenSource();//CAD延时 final InterruptionTokenSource source = new InterruptionTokenSource();//CAD延时
int index = outputFilePath.lastIndexOf(".");
String folder = outputFilePath.substring(0, index);
File path = new File(folder);
//目录不存在 创建新的目录
if (!path.exists()) {
path.mkdirs();
}
Callable<String> call = () -> { Callable<String> call = () -> {
File outputFile = new File(outputFilePath); File outputFile = new File(outputFilePath);
LoadOptions opts = new LoadOptions(); LoadOptions opts = new LoadOptions();