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 26723
Collapse All | Expand All

(-)src/org/netbeans/installer/UpgradeProfilePanel.java (-1 / +1 lines)
Lines 59-65 Link Here
59
        debug("size: "+detectedData.size());                //NOI18N    
59
        debug("size: "+detectedData.size());                //NOI18N    
60
        while(el.hasMoreElements()){
60
        while(el.hasMoreElements()){
61
            String[] data = (String[])el.nextElement();            
61
            String[] data = (String[])el.nextElement();            
62
            if(data[1] == null){
62
            if((data[2] == null)||(data[2].length() != 0 )){
63
                debug("continue");
63
                debug("continue");
64
                continue;
64
                continue;
65
            }else{
65
            }else{
(-)src/org/netbeans/installer/actions/DetectAction.java (-8 / +8 lines)
Lines 150-166 Link Here
150
    }
150
    }
151
    
151
    
152
    /**
152
    /**
153
     * Checks if there is something upgradable(with install and user dir)
153
     * Checks if there is something upgradable(with uninstall and user dir)
154
     *
154
     *
155
     */
155
     */
156
    private void checkForUpgrade(){
156
    private void checkForUpgrade(){
157
        debug("checkForUpgrade");
157
  /*      debug("checkForUpgrade");
158
        boolean upgradable = false;
158
        boolean upgradable = false;
159
        for(int i=0; i<detectedData.size(); i++){
159
        for(int i=0; i<detectedData.size(); i++){
160
            String[] data = (String[])detectedData.elementAt(i);
160
            String[] data = (String[])detectedData.elementAt(i);
161
            if((data[1] != null)&&(data[1].length() != 0)){
161
            if((data[2] != null)&&(data[2].length() != 0)){       //checks if there is uninstaller or not
162
                debug("length: "+data[1].length());
162
                debug("!length: "+data[2].length());
163
                debug("upgradable: "+data[1]);  //NOI18N
163
                debug("!upgradable: "+data[2]);  //NOI18N
164
                upgradable = true;                
164
                upgradable = true;                
165
                break;
165
                break;
166
            }
166
            }
Lines 168-178 Link Here
168
        if(upgradable){
168
        if(upgradable){
169
            debug("upgrade=yes");
169
            debug("upgrade=yes");
170
            System.getProperties().put("upgrade_nb","yes");  //NOI18N
170
            System.getProperties().put("upgrade_nb","yes");  //NOI18N
171
        }else{
171
        }else{*/
172
            debug("upgrade=no");
172
            debug("upgrade=no");
173
            System.getProperties().put("upgrade_nb","no"); //NOI18N
173
            System.getProperties().put("upgrade_nb","no"); //NOI18N
174
            System.getProperties().put("showUpgradeInstall","no"); //NOI18N            
174
            System.getProperties().put("showUpgradeInstall","no"); //NOI18N            
175
        }
175
       // }
176
    }
176
    }
177
    
177
    
178
    
178
    
Lines 514-520 Link Here
514
        d.setVisible(true);
514
        d.setVisible(true);
515
    }
515
    }
516
    
516
    
517
    private boolean debug = false;
517
    private boolean debug = true;
518
    private void debug(String message){
518
    private void debug(String message){
519
        if (!debug)
519
        if (!debug)
520
            return;
520
            return;
(-)src/org/netbeans/installer/actions/UninstallPreviousAction.java (-13 / +5 lines)
Lines 79-96 Link Here
79
        }
79
        }
80
        if(fileService == null)
80
        if(fileService == null)
81
            return;
81
            return;
82
        //if there is no uninstaller - simply rmove install-dir
82
        if((uninstaller_path == null)||(uninstaller_path.length() == 0)){
83
        if(uninstaller_path == null){
84
            debug("uninstallPath is null"); //NOI18N
83
            debug("uninstallPath is null"); //NOI18N
85
            String filePath = getUpgradePath();
84
            return; //shouldn't happen
86
            if(filePath != null){
87
                debug("path is not null - will be removed:"+filePath);  //NOI18N
88
                try{
89
                    fileService.deleteDirectory(filePath,false,true);                
90
                }catch(Exception expn){
91
                    logEvent(this, Log.ERROR, expn);
92
                }
93
            }
94
        }else{
85
        }else{
95
            jdkHome = (String)System.getProperties().getProperty("java.home");              //NOI18N
86
            jdkHome = (String)System.getProperties().getProperty("java.home");              //NOI18N
96
            try {
87
            try {
Lines 121-128 Link Here
121
                return;
112
                return;
122
            
113
            
123
            if(fileService.fileExists(getUninstallerLocation())){
114
            if(fileService.fileExists(getUninstallerLocation())){
124
                fileService.deleteFile(getUninstallerLocation());
115
                File file = new File(getUninstallerLocation()); 
125
                fileService.deleteDirectory(getUpgradePath(),false,true);
116
                String uninstDir = file.getParent();
117
                fileService.deleteDirectory(uninstDir, false,true);               
126
            }
118
            }
127
        }catch (Exception e) {
119
        }catch (Exception e) {
128
            e.printStackTrace();
120
            e.printStackTrace();

Return to bug 26723