* @return Backed up SessionFile or null if failed to make backup.
*/
protected File backupSessionFile() {
- return backupSessionFile(null, sessionFile.getName(),".old", sessionFile.getParentFile());
+ return backupSessionFile(fileLock, sessionFile.getName(),".old", sessionFile.getParentFile());
}
protected File backupSessionFile(Lock extantLock, String backupPrefix, String backupSuffix, File backupDir) {
fileLock.length());
tos.close();
if (!channel.isOpen())
- throw new Error(tos.getChannel().getClass()+".transferFrom closes source channel!");
+ throw new Error("LIBRARY PORTABILITY ISSUE: "+tos.getChannel().getClass()+".transferFrom closes source channel!");
if (!lockFile(extantLock))
- throw new Error("Lost lock for "+sessionFile.getName()+" after backup.");
+ throw new Error("LIBRARY PORTABILITY ISSUE: Lost lock for "+sessionFile.getName()+" after backup.");
}
} catch (FileNotFoundException e1) {
lockFile();
trafile = fileLock.getRaFile();
}*/
+ // TODO JBPNote: attempt to ensure save really saves the VamDoc.jar file
trafile.seek(0);
trafile.getChannel().transferFrom(nrafile.getChannel(), 0,
nrafile.length());
+ // JBPNote: attempt to close the streams to flush the data out
+ // trafile.close();
+ //nrafile.close();
}
/**
* remove all trace of the sessionFile file