Changeset 17434 for release-kits


Ignore:
Timestamp:
2008-10-01T16:08:54+13:00 (16 years ago)
Author:
oranfry
Message:

made installer automatically skip over certain files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/uninstaller/Uninstaller.java

    r17426 r17434  
    255255        //delete the files
    256256        try {
    257             File[] exceptions = null;
     257            ArrayList<File> exceptions = new ArrayList<File>();
     258
     259            //never delete the things we are currently running
     260            exceptions.add( "bin/search4j.exe" );
     261            exceptions.add( "packages/jre" );
     262            exceptions.add( "uninst.jar" );
     263            exceptions.add( "Uninstall.bat" );
     264            exceptions.add( "Uninstall.sh" );
     265
    258266            if ( keepCollections ) {
    259                 exceptions = new File[2];
    260                 exceptions[0] = new File("web/sites/localsite/collect");
    261                 exceptions[1] = new File("collect");
    262             }
     267                exceptions.add( new File("web/sites/localsite/collect") );
     268                exceptions.add( new File("collect") );
     269            }
     270
    263271
    264272            File cd = null;
     
    269277                System.exit(0);
    270278            }
    271             recursiveDelete( cd , exceptions );
     279            recursiveDelete( cd , exceptions.toArray() );
    272280        } catch ( CancelledException ce ) {
    273281            log.append( bundle.getString("cancelled") + "\n" );
Note: See TracChangeset for help on using the changeset viewer.