From cf75719bb6f6a556798c93d667486d91b9d1e59e Mon Sep 17 00:00:00 2001 From: pmarguerite Date: Fri, 5 Jan 2007 19:01:15 +0000 Subject: [PATCH] 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 --- src/uk/ac/vamsas/client/simpleclient/VamsasSession.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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; } -- 1.7.10.2