You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/12/30 13:45:02 UTC

[GitHub] [commons-io] garydgregory commented on a change in pull request #179: IO-600: fix getPrefixLength method for Linux filename

garydgregory commented on a change in pull request #179:
URL: https://github.com/apache/commons-io/pull/179#discussion_r550199697



##########
File path: src/main/java/org/apache/commons/io/FilenameUtils.java
##########
@@ -665,7 +665,10 @@ public static int getPrefixLength(final String fileName) {
         if (ch1 == ':') {
             ch0 = Character.toUpperCase(ch0);
             if (ch0 >= 'A' && ch0 <= 'Z') {
-                if (len == 2 || isSeparator(fileName.charAt(2)) == false) {
+                if (len == 2 && !FileSystem.getCurrent().supportsDriveLetter()) {

Review comment:
       The last step is to document this in the Javadoc for the method.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org