X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=validparameter.cpp;fp=validparameter.cpp;h=cfe9d509112e921aef92c0cf914e10f6ca885079;hb=8bc3e5b38c2317a1715f53be22fa96455868c281;hp=50cd4e316186847b350a13b465f6d032ed91fcb8;hpb=f663afa231c9bc1b5e18e0ea3bdd2b2ee784f5b2;p=mothur.git diff --git a/validparameter.cpp b/validparameter.cpp index 50cd4e3..cfe9d50 100644 --- a/validparameter.cpp +++ b/validparameter.cpp @@ -245,6 +245,16 @@ string ValidParameters::validFile(map& 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