From 0a868a9601b051aeaf439a8d73f6fc070044a02c Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 5 Nov 2007 16:17:49 +0000 Subject: [PATCH] try to set sessionmodified flag if the client document was actually modified. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@486 be28352e-c001-0410-b1a7-c7978e42abec --- src/uk/ac/vamsas/client/simpleclient/SimpleClient.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uk/ac/vamsas/client/simpleclient/SimpleClient.java b/src/uk/ac/vamsas/client/simpleclient/SimpleClient.java index d13fe24..2368164 100644 --- a/src/uk/ac/vamsas/client/simpleclient/SimpleClient.java +++ b/src/uk/ac/vamsas/client/simpleclient/SimpleClient.java @@ -352,6 +352,7 @@ public class SimpleClient implements IClient { 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. @@ -359,7 +360,10 @@ public class SimpleClient implements IClient { } else { log.debug("Document update successful."); } - _session.setUnsavedFlag(); + if (hasContent) + { + _session.setUnsavedFlag(); + } } catch (IOException e) { log.warn("IO Problems when updating document!",e); -- 1.7.10.2