Skip to content

Commit 6906ccd

Browse files
authored
Merge pull request Blankj#52 from ImKarl/master
fix FileUtils.getFileExtension()
2 parents 27e246a + 9722602 commit 6906ccd

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)