()
| 42 | } |
| 43 | |
| 44 | private static File guessSteamPath() { |
| 45 | if (Main.isUnix()) { |
| 46 | File potentialPath = new File(System.getProperty("user.home") + File.separator + STEAM_NAME_UNIX); |
| 47 | if (isSteamPath(potentialPath)) { |
| 48 | return potentialPath; |
| 49 | } |
| 50 | } |
| 51 | for (String first : POTENTIAL_STEAM_PATH_GRAND_PARENTS) { |
| 52 | for (String second : POTENTIAL_STEAM_PATH_PARENTS) { |
| 53 | File potentialPath = new File(first + File.separator + second + File.separator + STEAM_NAME); |
| 54 | if (isSteamPath(potentialPath)) { |
| 55 | return potentialPath; |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | return null; |
| 60 | } |
| 61 | |
| 62 | public static boolean isSteamPath(File path) { |
| 63 | if (path == null) { |
no test coverage detected