Changeset 76 in josm


Ignore:
Timestamp:
Mar 30, 2006 12:52:24 AM (7 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.