From: <jtc...@li...> - 2006-02-05 17:54:26
|
Update of /cvsroot/jtcfrost/frost-wot/source/frost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8586/source/frost Modified Files: CleanUp.java SettingsClass.java Startup.java Log Message: added SENT folder (not yet in GUI) Index: Startup.java =================================================================== RCS file: /cvsroot/jtcfrost/frost-wot/source/frost/Startup.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Startup.java 12 Sep 2005 13:21:59 -0000 1.27 --- Startup.java 5 Feb 2006 17:54:17 -0000 1.28 *************** *** 85,88 **** --- 85,94 ---- } + File sentDirectory = new File(settings.getValue("sent.dir")); + if( !sentDirectory.isDirectory() ) { + logger.warning("Creating sent directory"); + sentDirectory.mkdirs(); + } + File tempDirectory = new File(settings.getValue("temp.dir")); if( !tempDirectory.isDirectory() ) { Index: SettingsClass.java =================================================================== RCS file: /cvsroot/jtcfrost/frost-wot/source/frost/SettingsClass.java,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** SettingsClass.java 19 Oct 2005 17:28:36 -0000 1.76 --- SettingsClass.java 5 Feb 2006 17:54:17 -0000 1.77 *************** *** 79,90 **** writeSettingsFile(); } - // TODO: remove this, and use default or loaded value - // i need to add because i used 'unsent' as name in former - // CVS versions. So if you already have this settings: its wrong! - // we need the '#' to separate internal boards in keypool from normal board. - // normal board file names are not allowed to contain '#'. - // once all users have the '#unsent#' folder configured, this can be removed - // and you can change the directory location - settingsHash.put("unsent.dir", "localdata" + fs + "unsent" + fs); } --- 79,82 ---- *************** *** 167,170 **** --- 159,163 ---- else if ( key.equals("unsent.dir") + || key.equals("sent.dir") || key.equals("temp.dir") || key.equals("keypool.dir") *************** *** 554,557 **** --- 547,551 ---- defaults.put("keypool.dir", "keypool" + fs); defaults.put("unsent.dir", "localdata" + fs + "unsent" + fs); + defaults.put("sent.dir", "localdata" + fs + "sent" + fs); defaults.put("temp.dir", "localdata" + fs + "temp" + fs); defaults.put("archive.dir", "archive" + fs); Index: CleanUp.java =================================================================== RCS file: /cvsroot/jtcfrost/frost-wot/source/frost/CleanUp.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** CleanUp.java 19 Oct 2005 17:28:36 -0000 1.16 --- CleanUp.java 5 Feb 2006 17:54:17 -0000 1.17 *************** *** 32,35 **** --- 32,37 ---- */ public class CleanUp { + + // TODO: archive/delete expired SENT messages (Core.frostSettings.getValue("sent.dir")) private static Logger logger = Logger.getLogger(CleanUp.class.getName()); *************** *** 181,185 **** boardFolder.getName() + // "frost" File.separator + boardFolderFile.getName()+ // "/2005.9.1" ! File.separator +boardDateFolderFile.getName(); // "/msg.xml" File tfile = new File(targetfile); tfile.getParentFile().mkdirs(); --- 183,187 ---- boardFolder.getName() + // "frost" File.separator + boardFolderFile.getName()+ // "/2005.9.1" ! File.separator + boardDateFolderFile.getName(); // "/msg.xml" File tfile = new File(targetfile); tfile.getParentFile().mkdirs(); *************** *** 192,197 **** --- 194,202 ---- } } + // delete file after copy to archive OR if DELETE was requested if( boardDateFolderFile.delete() == true ) { deleted++; + } else { + logger.severe("Failed to delete expired file "+boardDateFolderFile.getPath()); } } |