VamsasSession: Fixed VamsasSession init/construction if the session directory exist...
authorpmarguerite <pmarguerite@issues.jalview.org>
Fri, 5 Jan 2007 19:01:15 +0000 (19:01 +0000)
committerpmarguerite <pmarguerite@issues.jalview.org>
Fri, 5 Jan 2007 19:01:15 +0000 (19:01 +0000)
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

index 5b8875c..1c77d66 100644 (file)
@@ -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;
       }