You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2018/03/10 15:28:18 UTC
commons-io git commit: Bullet-proofing.
Repository: commons-io
Updated Branches:
refs/heads/master f0751b65c -> d08dbbfdb
Bullet-proofing.
Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/d08dbbfd
Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/d08dbbfd
Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/d08dbbfd
Branch: refs/heads/master
Commit: d08dbbfdbc41cfafa122abf06d39ed543b473464
Parents: f0751b6
Author: Gary Gregory <ga...@gmail.com>
Authored: Sat Mar 10 08:28:15 2018 -0700
Committer: Gary Gregory <ga...@gmail.com>
Committed: Sat Mar 10 08:28:15 2018 -0700
----------------------------------------------------------------------
src/main/java/org/apache/commons/io/FileSystem.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-io/blob/d08dbbfd/src/main/java/org/apache/commons/io/FileSystem.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/io/FileSystem.java b/src/main/java/org/apache/commons/io/FileSystem.java
index 0bd3872..d6f50ad 100644
--- a/src/main/java/org/apache/commons/io/FileSystem.java
+++ b/src/main/java/org/apache/commons/io/FileSystem.java
@@ -18,6 +18,7 @@
package org.apache.commons.io;
import java.util.Arrays;
+import java.util.Locale;
import java.util.Objects;
/**
@@ -76,7 +77,7 @@ public enum FileSystem {
* The field will return {@code false} if {@code OS_NAME} is {@code null}.
* </p>
*/
- private static final boolean IS_OS_LINUX = getOsMatchesName("Linux") || getOsMatchesName("LINUX");
+ private static final boolean IS_OS_LINUX = getOsMatchesName("Linux");
/**
* <p>
@@ -174,7 +175,7 @@ public enum FileSystem {
if (osName == null) {
return false;
}
- return osName.startsWith(osNamePrefix);
+ return osName.toUpperCase(Locale.ROOT).startsWith(osNamePrefix.toUpperCase(Locale.ROOT));
}
private final char[] illegalFileNameChars;