From: pmarguerite Date: Fri, 5 Jan 2007 19:01:15 +0000 (+0000) Subject: VamsasSession: Fixed VamsasSession init/construction if the session directory exist... X-Git-Tag: Release_0.2~190 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=cf75719bb6f6a556798c93d667486d91b9d1e59e;p=vamsas.git VamsasSession: Fixed VamsasSession init/construction if the session directory exists and do not contains session files. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@330 be28352e-c001-0410-b1a7-c7978e42abec --- diff --git a/src/uk/ac/vamsas/client/simpleclient/VamsasSession.java b/src/uk/ac/vamsas/client/simpleclient/VamsasSession.java index 5b8875c..1c77d66 100644 --- a/src/uk/ac/vamsas/client/simpleclient/VamsasSession.java +++ b/src/uk/ac/vamsas/client/simpleclient/VamsasSession.java @@ -162,11 +162,13 @@ public class VamsasSession { if (sessionDir1.exists()) { if (!sessionDir1.isDirectory() || !sessionDir1.canWrite() || !sessionDir1.canRead()) throw new IOException("Cannot access '"+sessionDir1+"' as a read/writable Directory."); - if (checkSessionFiles(sessionDir1)) { - createSessionFiles(); - } + this.sessionDir = sessionDir1;//createSessionFiles, need sessionDir attribute set + if (!checkSessionFiles(sessionDir1)) + { + createSessionFiles(); + } // session files exist in the directory - this.sessionDir = sessionDir1; + initSessionObjects(); slog.debug("Initialising additional VamsasSession instance"); log.debug("Attached to VamsasSession in "+sessionDir1); @@ -355,7 +357,7 @@ public class VamsasSession { { if (client == null) { - System.out.println("Try to remove a null client."); + //System.out.println("Try to remove a null client."); this.slog.error("Try to remove a null client."); return; }