Index: /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 9644)
+++ /trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 9645)
@@ -166,5 +166,5 @@
             File pathDir = new File(getValidatorDir());
             if (!pathDir.exists()) {
-                pathDir.mkdirs();
+                Utils.mkDirs(pathDir);
             }
         } catch (Exception e) {
Index: /trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java	(revision 9644)
+++ /trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java	(revision 9645)
@@ -96,5 +96,5 @@
                 File newDir = file.getParentFile();
                 if (!newDir.exists()) {
-                    newDir.mkdirs();
+                    Utils.mkDirs(newDir);
                 }
             }
@@ -184,5 +184,5 @@
                 File newFile = new File(dir, ze.getName());
                 if (ze.isDirectory()) {
-                    newFile.mkdirs();
+                    Utils.mkDirs(newFile);
                 } else try (InputStream is = zf.getInputStream(ze)) {
                     Files.copy(is, newFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
Index: /trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 9644)
+++ /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 9645)
@@ -427,5 +427,5 @@
         File destDirFile = new File(destDir);
         if (!destDirFile.exists()) {
-            destDirFile.mkdirs();
+            Utils.mkDirs(destDirFile);
         }
 
Index: /trunk/src/org/openstreetmap/josm/plugins/Plugin.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/Plugin.java	(revision 9644)
+++ /trunk/src/org/openstreetmap/josm/plugins/Plugin.java	(revision 9645)
@@ -118,5 +118,5 @@
         File pluginDir = new File(pluginDirName);
         if (!pluginDir.exists()) {
-            pluginDir.mkdirs();
+            Utils.mkDirs(pluginDir);
         }
         try (InputStream in = getClass().getResourceAsStream(from)) {
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 9644)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 9645)
@@ -364,5 +364,5 @@
                 if (!newPref.exists()) {
                     try {
-                        Main.pref.getPreferencesDirectory().mkdirs();
+                        Utils.mkDirs(Main.pref.getPreferencesDirectory());
                         Main.info("Copying old preferences file to new location");
                         Utils.copyFile(oldPref, newPref);
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 9644)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 9645)
@@ -460,5 +460,4 @@
      * Deletes a file and log a default warning if the deletion fails.
      * @param file file to delete
-     * and must contain a single parameter <code>{0}</code> for the file path
      * @return {@code true} if and only if the file is successfully deleted; {@code false} otherwise
      * @since 9296
@@ -480,4 +479,30 @@
         if (!result) {
             Main.warn(tr(warnMsg, file.getPath()));
+        }
+        return result;
+    }
+
+    /**
+     * Creates a directory and log a default warning if the creation fails.
+     * @param dir directory to create
+     * @return {@code true} if and only if the directory is successfully created; {@code false} otherwise
+     * @since 9645
+     */
+    public static boolean mkDirs(File dir) {
+        return mkDirs(dir, marktr("Unable to create directory {0}"));
+    }
+
+    /**
+     * Creates a directory and log a configurable warning if the creation fails.
+     * @param dir directory to create
+     * @param warnMsg warning message. It will be translated with {@code tr()}
+     * and must contain a single parameter <code>{0}</code> for the directory path
+     * @return {@code true} if and only if the directory is successfully created; {@code false} otherwise
+     * @since 9645
+     */
+    public static boolean mkDirs(File dir, String warnMsg) {
+        boolean result = dir.mkdirs();
+        if (!result) {
+            Main.warn(tr(warnMsg, dir.getPath()));
         }
         return result;
