]> git.donarmstrong.com Git - mothur.git/blobdiff - validparameter.cpp
added pipeline commands which involved change to command factory and command class...
[mothur.git] / validparameter.cpp
index 50cd4e316186847b350a13b465f6d032ed91fcb8..cfe9d509112e921aef92c0cf914e10f6ca885079 100644 (file)
@@ -245,6 +245,16 @@ string ValidParameters::validFile(map<string, string>& container, string paramet
                                        }
                                }
                                
+                               //if you can't open it, try default location
+                               if (ableToOpen == 1) {
+                                       if (m->getOutputDir() != "") { //default path is set
+                                               string tryPath = m->getOutputDir() + m->getSimpleName(it->second);
+                                               m->mothurOut("Unable to open " + it->second + ". Trying output directory " + tryPath); m->mothurOutEndLine();
+                                               ableToOpen = m->openInputFile(tryPath, in, "noerror");
+                                               container[parameter] = tryPath;
+                                       }
+                               }
+                               
                                in.close();
 
                        #ifdef USE_MPI