Skip to content

Commit 9722602

Browse files
author
authored
fix FileUtils.getFileExtension()
修复由于获取文件拓展名错误,导致的一系列问题(如6.0安装APK异常)
1 parent 27e246a commit 9722602

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utilcode/src/main/java/com/blankj/utilcode/utils/FileUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,6 @@ public static String getFileExtension(String filePath) {
10861086
int lastPoi = filePath.lastIndexOf('.');
10871087
int lastSep = filePath.lastIndexOf(File.separator);
10881088
if (lastPoi == -1 || lastSep >= lastPoi) return "";
1089-
return filePath.substring(lastPoi);
1089+
return filePath.substring(lastPoi+1);
10901090
}
1091-
}
1091+
}

0 commit comments

Comments
 (0)