|
@@ -156,7 +156,7 @@ public class CosTemplate implements FileStorageTemplate {
|
|
|
GetObjectRequest getObjectRequest = new GetObjectRequest(bucket, pathKey);
|
|
|
log.info("下载开始:下载bucket={},下载pathKey={},下载filePath={}", bucket, pathKey, file);
|
|
|
File downloadFile = new File(file);
|
|
|
- if (!FileUtil.exist(downloadFile.getParent())&&downloadFile.isDirectory()){
|
|
|
+ if (!FileUtil.exist(downloadFile.getParent())){
|
|
|
FileUtil.mkdir(downloadFile.getParent());
|
|
|
}
|
|
|
return cosClient.getObject(getObjectRequest,downloadFile);
|