修复下载路径中?后面存在/导致的崩溃问题

This commit is contained in:
DaveBoy1994
2020-03-13 10:40:33 +08:00
parent 41088dfa23
commit a65b2e31f9

View File

@@ -107,8 +107,8 @@ public class DbDataHelper {
int lastIndex = url.lastIndexOf(File.separator);
//去除url末尾携带的的参数
int endIndex = url.lastIndexOf("?");
if(endIndex<0)endIndex=url.length();
if(endIndex<0||endIndex<lastIndex)endIndex=url.length();
entity.setFileName(url.substring(lastIndex + 1,endIndex));
entity.setGroupHash(groupHash);
entity.setGroupChild(true);