X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=setlogfilecommand.cpp;h=329fd1fdbeb28ba673c883eeb6ea36fe059c64fc;hb=6b32d112bb60e9f7eb6d4407a4eed4c49b67bced;hp=128c5671ed55712d2293e0b3c3959da17a7e9f05;hpb=deba0af0ccdcb6005ed5b2b82649b137c63fbdf7;p=mothur.git diff --git a/setlogfilecommand.cpp b/setlogfilecommand.cpp index 128c567..329fd1f 100644 --- a/setlogfilecommand.cpp +++ b/setlogfilecommand.cpp @@ -85,9 +85,14 @@ int SetLogFileCommand::execute(){ if (abort == true) { if (calledHelp) { return 0; } return 2; } - commandFactory = CommandFactory::getInstance(); - - commandFactory->setLogfileName(name, append); + commandFactory = CommandFactory::getInstance(); + + string directory = m->hasPath(name); + if (directory == "") { + commandFactory->setLogfileName(name, append); + }else if (m->dirCheck(directory)) { + commandFactory->setLogfileName(name, append); + } return 0; }