This method will check for the system specific custom directory and will create it if it exists.
()
| 239 | * and will create it if it exists. |
| 240 | */ |
| 241 | private static void ensureCustomDirExists() |
| 242 | { |
| 243 | File customDir = new File(PCGenSettings.getCustomDir() + File.separator + SettingsHandler.getGameAsProperty().get().getName()); |
| 244 | if (!customDir.exists()) |
| 245 | { |
| 246 | try |
| 247 | { |
| 248 | customDir.mkdirs(); |
| 249 | } catch (SecurityException se) |
| 250 | { |
| 251 | Logging.errorPrint( |
| 252 | "Unable to create custom data directory '" + customDir.getPath() + "' due the following error.", |
| 253 | se); |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Write custom items out |
no test coverage detected