PrintWriter out = new PrintWriter(
new FileWriter(backupfiles.getTempFilePath()));
- Cache.log.debug("ALIGNFRAME using temp file "
+ Cache.log.debug("ALIGNFRAME about to write to temp file "
+ backupfiles.getTempFilePath());
out.print(output);
backupfiles.setWriteSuccess(success);
Cache.log.debug("ALIGNFRAME writing temp file was "
- + (success ? "" : "not ") + "successful");
+ + (success ? "" : "NOT ") + "successful");
// do the backup file roll and rename the temp file to actual file
Cache.log.debug("ALIGNFRAME about to rollBackupsAndRenameTempFile");
success = backupfiles.rollBackupsAndRenameTempFile();
String tempfilename = file.getName();
File tempdir = file.getParentFile();
Cache.log.debug(
- "BACKUPFILES [file!=null] attempting to create temp file "
+ "BACKUPFILES [file!=null] attempting to create temp file for "
+ tempfilename + " in dir " + tempdir);
temp = File.createTempFile(tempfilename,
TEMP_FILE_EXT + newTempFileSuffix, tempdir);
+ Cache.log.debug(
+ "BACKUPFILES using temp file " + temp.getAbsolutePath());
}
else
{
public static void classInit()
{
Cache.log.debug("BACKUPFILES classInit");
- setEnabled(Cache.getDefault(ENABLED, true));
+ boolean e = Cache.getDefault(ENABLED, true);
+ setEnabled(e);
+ Cache.log.debug("BACKUPFILES " + (e ? "enabled" : "disabled"));
BackupFilesPresetEntry bfpe = BackupFilesPresetEntry
.getSavedBackupEntry();
+ Cache.log.debug("BACKUPFILES preset scheme " + bfpe.toString());
setConfirmDelete(bfpe.confirmDelete);
+ Cache.log.debug("BACKUPFILES confirm delete " + bfpe.confirmDelete);
}
public static void setEnabled(boolean flag)
Cache.log.debug("BACKUPFILES Moving old file [" + file
+ "] to latestBackupFilename [" + latestBackupFilename + "]");
ret |= moveFileToFile(file, new File(latestBackupFilename));
- Cache.log.debug("BACKUPFILES moving " + latestBackupFilename + " to "
- + file + " was " + (ret ? "" : "NOT ") + "successful");
-
+ Cache.log.debug(
+ "BACKUPFILES moving " + file + " to " + latestBackupFilename
+ + " was " + (ret ? "" : "NOT ") + "successful");
if (tidyUp)
{
Cache.log.debug("BACKUPFILES tidying up files");
+ " to " + newFile.getAbsolutePath());
Files.move(oldPath, newPath, StandardCopyOption.REPLACE_EXISTING);
ret = true;
- Cache.log.debug("BACKUPFILES move seemse to have succeeded");
+ Cache.log.debug("BACKUPFILES move seems to have succeeded");
} catch (IOException e)
{
Cache.log.warn("Could not move file '" + oldPath.toString() + "' to '"
*/
package jalview.io;
-import jalview.bin.Cache;
-import jalview.util.MessageManager;
-
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
+import jalview.bin.Cache;
+import jalview.util.MessageManager;
+
public class BackupFilesPresetEntry
{
{
String savedPresetString = Cache
.getDefault(BackupFilesPresetEntry.SAVEDCONFIG, null);
+ Cache.log.debug("BACKUPFILESPRESETENTRY saved preset string is "
+ + savedPresetString);
BackupFilesPresetEntry savedPreset = BackupFilesPresetEntry
.createBackupFilesPresetEntry(savedPresetString);
if (savedPreset == null)