|
@@ -396,12 +396,18 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- String fileName = key.substring(key.lastIndexOf("/")+1, key.indexOf("."));
|
|
|
- String ext = key.substring(key.lastIndexOf("."));
|
|
|
+ String fileName = null;
|
|
|
+ String ext = null;
|
|
|
+
|
|
|
+ try {
|
|
|
+ fileName = key.substring(key.lastIndexOf("/")+1, key.indexOf("."));
|
|
|
+ ext = key.substring(key.lastIndexOf("."));
|
|
|
+ }catch (Exception e){
|
|
|
+ log.error("异常文件=" + key);
|
|
|
+ }
|
|
|
String[] arr = fileName.split("_skybox");
|
|
|
String dir = arr[0];
|
|
|
String num = arr[1];
|
|
|
-
|
|
|
if(StrUtil.isEmpty(fileName)
|
|
|
|| StrUtil.isEmpty(ext)
|
|
|
|| (".jpg".equals(ext) && ".png".equals(ext))
|
|
@@ -409,7 +415,6 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
|| StrUtil.isEmpty(num)){
|
|
|
throw new Exception("本地下载图片资源不符合规则,key:" + key);
|
|
|
}
|
|
|
-
|
|
|
for (ImageType imageType : imageTypes) {
|
|
|
|
|
|
List<ImageTypeDetail> items = Lists.newArrayList();
|