|
@@ -115,7 +115,7 @@ public class MyFileUtils {
|
|
|
public static List<BFile> getSonFiles(String basePath, FilenameFilter filter, boolean auth) {
|
|
|
if (StringUtils.isBlank(basePath)) return Lists.newArrayList();
|
|
|
File oriDic = new File(basePath);
|
|
|
- if (!oriDic.exists() || oriDic.isFile() || (!auth && oriDic.getName().startsWith(String.valueOf(UploadConfig.AUTH_STR)))) {
|
|
|
+ if (!oriDic.exists() || oriDic.isFile() || (!auth && basePath.contains(String.valueOf(UploadConfig.AUTH_STR)))) {
|
|
|
return Lists.newArrayList();
|
|
|
}
|
|
|
if (oriDic.exists() && oriDic.isDirectory()) {
|
|
@@ -186,7 +186,7 @@ public class MyFileUtils {
|
|
|
if (StringUtils.isBlank(path)) return Lists.newArrayList();
|
|
|
boolean access = AuthUtil.checkAccess(userDetails, AuthUtil.ACCESS);
|
|
|
File oriDic = new File(path);
|
|
|
- if (!oriDic.exists() || oriDic.isFile() || (!access && oriDic.getName().startsWith(String.valueOf(UploadConfig.AUTH_STR)))) {
|
|
|
+ if (!oriDic.exists() || oriDic.isFile() || (!access && path.contains(String.valueOf(UploadConfig.AUTH_STR)))) {
|
|
|
return Lists.newArrayList();
|
|
|
}
|
|
|
File[] subFiles = oriDic.listFiles((dir, name) -> access || !name.startsWith(String.valueOf(UploadConfig.AUTH_STR)));
|