From 671c415ca7aafded7e7069d1a27f097bd64eeb4e Mon Sep 17 00:00:00 2001 From: Sam Mauck Date: Mon, 12 Aug 2013 19:24:29 -0600 Subject: [PATCH] Use File.separator instead of guessing --- src/com/github/ss111/ConfigHelper.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/com/github/ss111/ConfigHelper.java b/src/com/github/ss111/ConfigHelper.java index 3dd7e52..3e08003 100644 --- a/src/com/github/ss111/ConfigHelper.java +++ b/src/com/github/ss111/ConfigHelper.java @@ -254,14 +254,7 @@ public static void populateMaps(String path) { */ public static String getPrettyName(String input) { - if (input.contains("\\")) { - - return input.substring(input.lastIndexOf("\\") + 1); - - } else { - - return input.substring(input.lastIndexOf("/") + 1); - } + return input.substring(input.lastIndexOf(File.separator) + 1); } /**