git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@486
be28352e-c001-0410-b1a7-
c7978e42abec
private void writeSessionDocument() {
try {
boolean updated=cdocument.updateSessionDocument();
private void writeSessionDocument() {
try {
boolean updated=cdocument.updateSessionDocument();
+ boolean hasContent=cdocument.isModified();
if (!updated) {
log.warn("Session document did not update properly for session directory "+_session.sessionDir);
// cdocument.archive.cancelArchive(); // LATER: could be done - would need to prevent updateSessionDocument closing the iohandler.
if (!updated) {
log.warn("Session document did not update properly for session directory "+_session.sessionDir);
// cdocument.archive.cancelArchive(); // LATER: could be done - would need to prevent updateSessionDocument closing the iohandler.
} else {
log.debug("Document update successful.");
}
} else {
log.debug("Document update successful.");
}
- _session.setUnsavedFlag();
+ if (hasContent)
+ {
+ _session.setUnsavedFlag();
+ }
}
catch (IOException e) {
log.warn("IO Problems when updating document!",e);
}
catch (IOException e) {
log.warn("IO Problems when updating document!",e);