]> git.donarmstrong.com Git - mothur.git/blobdiff - readotucommand.cpp
adding more error checking for list and group files. outputs missing.names or missin...
[mothur.git] / readotucommand.cpp
index bb866ed9364557765a38ad78cf1bb047ea502fc9..999d8de95ecdda62b411e3d5fab11092d3105636 100644 (file)
@@ -159,14 +159,22 @@ int ReadOtuCommand::execute(){
                if (globaldata->getFormat() == "shared") {
                        
                        shared = new SharedCommand();
-                       shared->execute();
+                       int okay = shared->execute();
                        delete shared;
+                       
+                       //problem with shared
+                       if (okay == 1) {
+                               globaldata->setListFile("");
+                               globaldata->setGroupFile("");
+                               globaldata->setSharedFile("");
+                       }else{
                                
-                       //change format to shared  to speed up commands
-                       globaldata->setFormat("sharedfile");
-                       globaldata->setListFile("");
-                       globaldata->setGroupFile("");
-                       globaldata->setSharedFile(getRootName(filename) + "shared");
+                               //change format to shared  to speed up commands
+                               globaldata->setFormat("sharedfile");
+                               globaldata->setListFile("");
+                               globaldata->setGroupFile("");
+                               globaldata->setSharedFile(getRootName(filename) + "shared");
+                       }
                }
                return 0;
        }