This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 32825
Collapse All | Expand All

(-)src/org/netbeans/installer/actions/WriteAction.java (-7 / +12 lines)
Lines 24-29 Link Here
24
import java.io.*;
24
import java.io.*;
25
import java.util.StringTokenizer;
25
import java.util.StringTokenizer;
26
import java.awt.Frame;
26
import java.awt.Frame;
27
import java.util.Properties;
27
import org.netbeans.installer.*;
28
import org.netbeans.installer.*;
28
29
29
/*
30
/*
Lines 150-155 Link Here
150
            }
151
            }
151
            String upgrade_nb = System.getProperties().getProperty("upgrade_nb");   //NOI18N
152
            String upgrade_nb = System.getProperties().getProperty("upgrade_nb");   //NOI18N
152
            String import_nb = System.getProperties().getProperty("import_nb");     //NOI18N
153
            String import_nb = System.getProperties().getProperty("import_nb");     //NOI18N
154
            debug("upgrade_nb: "+upgrade_nb);
155
            debug("import_nb: "+import_nb);
153
            if(((upgrade_nb != null) && (upgrade_nb.equals("yes")))||((import_nb != null) && (import_nb.equals("yes")))){    //NOI18N
156
            if(((upgrade_nb != null) && (upgrade_nb.equals("yes")))||((import_nb != null) && (import_nb.equals("yes")))){    //NOI18N
154
                copyPreSettings();
157
                copyPreSettings();
155
                setAutomaticModeISW();  //start Import Settings Wizard in none-interactive mode during first IDE startup
158
                setAutomaticModeISW();  //start Import Settings Wizard in none-interactive mode during first IDE startup
Lines 189-205 Link Here
189
            }
192
            }
190
        }
193
        }
191
        File upgradeFile = new File(installDir, "upgrade.properties");
194
        File upgradeFile = new File(installDir, "upgrade.properties");
192
        FileWriter upgradeW = null;
195
        Properties prop = new Properties();
196
        prop.put("VERSION", getVersion()+"- User Directory");
197
        prop.put("BACKUP_FOLDER",System.getProperties().getProperty("former_user_dir"));
198
        FileOutputStream out = null;      
193
        try{
199
        try{
194
            upgradeW = new FileWriter(upgradeFile,true);
200
            out = new FileOutputStream(upgradeFile);
195
            upgradeW.write("VERSION="+getVersion()+"- User Directory\n");       //NOI18N
201
            prop.store(out, null);
196
            upgradeW.write("BACKUP_FOLDER="+System.getProperties().getProperty("former_user_dir")+"\n");
202
            out.close();
197
            upgradeW.write("\n");
198
            upgradeW.close();            
199
        }catch(Exception e){
203
        }catch(Exception e){
204
            logEvent(this, Log.ERROR, e);
200
        }finally{
205
        }finally{
201
            try{
206
            try{
202
                upgradeW.close();
207
                out.close();
203
            }catch(Exception ie){
208
            }catch(Exception ie){
204
                //ignore
209
                //ignore
205
            }
210
            }

Return to bug 32825