Changeset 17254
- Timestamp:
- 2008-09-11T15:48:56+12:00 (16 years ago)
- Location:
- release-kits/shared/uninstaller
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/shared/uninstaller
-
Property svn:ignore
set to
startmenu
gsdl
-
Property svn:ignore
set to
-
release-kits/shared/uninstaller/Uninstaller.java
r17251 r17254 322 322 //log.append( "Processing: " + f.getAbsolutePath() + "\n" ); 323 323 324 // Make sure the file or directory exists and isn't write protected324 // Make sure the file or directory exists 325 325 if (!f.exists()) { 326 log.append( bundle.getString("warning.nonexistent").replaceAll( "\\{file\\}", f.getAbsolutePath() ) + "\n" );326 log.append( Strings.replaceAll( bundle.getString("warning.nonexistent"), "{file}", f.getAbsolutePath() ) + "\n" ); 327 327 return; 328 328 } … … 334 334 try { 335 335 if ( f.equals( exceptions[i] ) || f.getCanonicalPath().equals(exceptions[i].getCanonicalPath()) ) { 336 log.append( bundle.getString("info.skipping").replaceAll( "\\{file\\}", f.getAbsolutePath() ) + "\n" );336 log.append( Strings.replaceAll( bundle.getString("info.skipping"), "{file}", f.getAbsolutePath() ) + "\n" ); 337 337 return; 338 338 } … … 346 346 //check existance 347 347 if ( !f.exists() ) { 348 log.append( bundle.getString("error.nonexistent").replaceAll( "\\{file\\}", f.getAbsolutePath() ) + "\n" );348 log.append( Strings.replaceAll( bundle.getString("error.nonexistent"), "{file}", f.getAbsolutePath() ) + "\n" ); 349 349 return; 350 350 } 351 352 //check writability353 /*if ( !f.canWrite() ) {354 log.append( bundle.getString("warning.readonly").replaceAll( "\\{file\\}", f.getAbsolutePath() ) + "\n" );355 }*/356 351 357 352 //if it is a directory, recurse … … 378 373 if ( doDelete ) { 379 374 380 log.append( bundle.getString("deleting").replaceAll( "\\{file\\}", f.getAbsolutePath() ) + "\n" );375 log.append( Strings.replaceAll( bundle.getString("deleting"), "{file}", f.getAbsolutePath() ) + "\n" ); 381 376 while ( !f.delete() ) { 382 log.append( bundle.getString("warning.couldnt.delete").replaceAll( "\\{file\\}", f.getAbsolutePath() ) + "\n" );377 log.append( Strings.replaceAll( bundle.getString("warning.couldnt.delete"), "{file}", f.getAbsolutePath() ) + "\n" ); 383 378 384 379 if ( ignoreReadOnlys ) { … … 389 384 int n = JOptionPane.showOptionDialog( 390 385 frame, 391 bundle.getString("warning.readonly").replaceAll( "\\{file\\}", f.getAbsolutePath() ),386 Strings.replaceAll( bundle.getString("warning.readonly"), "{file}", f.getAbsolutePath() ), 392 387 bundle.getString("readonly"), 393 388 JOptionPane.YES_NO_CANCEL_OPTION, … … 420 415 finishToolbar.setVisible(true); 421 416 } 422 423 417 424 418 } 419 420 class Strings { 421 static String replaceAll( String s, String nugget, String replacement ) { 422 StringBuffer string = new StringBuffer(s); 423 StringBuffer r = new StringBuffer(); 424 425 int io = 0; 426 while ( (io=string.toString().indexOf(nugget)) != -1 ) { 427 r.append( string.toString().substring( 0, io ) ); 428 r.append( replacement ); 429 string.delete( 0, io + nugget.length() ); 430 } 431 r.append( string.toString() ); 432 return r.toString(); 433 } 434 } 435 -
release-kits/shared/uninstaller/Uninstaller.properties
r17236 r17254 22 22 cancelled:Uninstall Cancelled 23 23 finished:Uninstall Finished 24 deleting:Deleting {file} 24 deleting:Deleting {file} from disk 25 25 26 info.skipping:INFO: Skipping File:{file}26 info.skipping:INFO: Skipping {file} 27 27 info.no.startmenu:INFO: No StartMenu path found. Deleting a StartMenu group will not be part of this uninstall. 28 warning.readonly:WARNING: File:{file} appears to be read-only29 warning.couldnt.delete:WARNING: File:{file} could not be deleted30 warning.nonexistent:WARNING: File:{file} does not exist31 error.nonexistent:ERROR: File:{file} does not exist28 warning.readonly:WARNING: {file} appears to be read-only 29 warning.couldnt.delete:WARNING: {file} could not be deleted 30 warning.nonexistent:WARNING: {file} does not exist 31 error.nonexistent:ERROR: {file} does not exist 32 32 error.couldnt.find.install.props:ERROR: Could not find the 'installation.properties' or 'etc/installation.properties' file.\nEither this is not a valid Greenstone installation, or the installation has been corrupted.\nUninstallation cannot proceed. -
release-kits/shared/uninstaller/gsdl-template
-
Property svn:ignore
set to
Uninstaller.jar
-
Property svn:ignore
set to
Note:
See TracChangeset
for help on using the changeset viewer.