解压方案新版测试修复乱码Linux问题
This commit is contained in:
@ -40,16 +40,7 @@ public class CompressFilePreviewImpl implements FilePreview {
|
||||
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
|
||||
}
|
||||
String filePath = response.getContent();
|
||||
if ("zip".equalsIgnoreCase(suffix) || "jar".equalsIgnoreCase(suffix) || "gzip".equalsIgnoreCase(suffix)) {
|
||||
fileTree = compressFileReader.readZipFile(filePath, fileName);
|
||||
} else if ("rar".equalsIgnoreCase(suffix)) {
|
||||
fileTree = compressFileReader.unRar(filePath, fileName);
|
||||
} else if ("7z".equalsIgnoreCase(suffix)) {
|
||||
fileTree = compressFileReader.read7zFile(filePath, fileName);
|
||||
}
|
||||
if (fileTree != null && !"null".equals(fileTree) && ConfigConstants.isCacheEnabled()) {
|
||||
fileHandlerService.addConvertedFile(fileName, fileTree);
|
||||
}
|
||||
fileTree = compressFileReader.unRar(filePath, fileName);
|
||||
} else {
|
||||
fileTree = fileHandlerService.getConvertedFile(fileName);
|
||||
}
|
||||
@ -57,7 +48,7 @@ public class CompressFilePreviewImpl implements FilePreview {
|
||||
model.addAttribute("fileTree", fileTree);
|
||||
return COMPRESS_FILE_PREVIEW_PAGE;
|
||||
} else {
|
||||
return otherFilePreview.notSupportedFile(model, fileAttribute, "压缩文件类型不受支持,尝试在压缩的时候选择RAR4格式");
|
||||
return otherFilePreview.notSupportedFile(model, fileAttribute, "压缩文件类型不受支持");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user