} else { compact(target);
	private void compact(File directory) {		if (Debug.DEBUG && Debug.DEBUG_GENERAL) {			Debug.println("compact(" + directory.getPath() + ")");		}		String list[] = directory.list();		if (list != null) {			int len = list.length;			for (int i = 0; i < len; i++) {				if (DATA_DIR_NAME.equals(list[i])) {					continue; /* do not examine the bundles data dir. */				}				File target = new File(directory, list[i]);				/* if the file is a directory */				if (target.isDirectory()) { //TODO Simplify the nesting.					File delete = new File(target, ".delete");					/* and the directory is marked for delete */					if (delete.exists()) {						/* if rm fails to delete the directory *						 * and .delete was removed						 */						if (!rm(target) && !delete.exists()) {							try {								/* recreate .delete */								FileOutputStream out = new FileOutputStream(delete);								out.close();							} catch (IOException e) {								if (Debug.DEBUG && Debug.DEBUG_GENERAL) {									Debug.println("Unable to write " + delete.getPath() + ": " + e.getMessage());								}							}						}					} else {						compact(target); /* descend into directory */					}				}			}		}	}