Changeset 76 in josm for src/org


Ignore:
Timestamp:
2006-03-30T00:52:24+02:00 (19 years ago)
Author:
imi
Message:

fixed: Preferences directory is now created if not present.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/Main.java

    r75 r76  
    214214                }
    215215
    216                
     216                File prefDir = new File(Preferences.getPreferencesDir());
     217                if (prefDir.exists() && !prefDir.isDirectory()) {
     218                        JOptionPane.showMessageDialog(null, "Cannot open preferences directory: "+Preferences.getPreferencesDir());
     219                        return;
     220                }
     221                if (!prefDir.exists())
     222                        prefDir.mkdirs();
     223
    217224                // load preferences
    218225                String errMsg = null;
Note: See TracChangeset for help on using the changeset viewer.