Fixed Ticket #4447 and #4535
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / PreferencesUtil.java
index 78b3c927dbe6356f720bb49773f5fe5619f7e9bd..bbca40e5a93ea95f652007fa35c2cca6a40d4fb3 100644 (file)
@@ -630,6 +630,10 @@ public class PreferencesUtil implements IPreferenceKeys {
         */
     public void writePropertyToConfigFile(int setLanguage) throws IOException {
         File file = org.eclipse.core.runtime.preferences.ConfigurationScope.INSTANCE.getLocation().toFile();
+        //give warning to user if the directory has no write access
+        if(file == null){
+            throw new IOException();
+        }
         Properties properties = load(file.getAbsolutePath()+"/config.ini");
         switch(setLanguage){
         case 0: