]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.cpp
fixes while testing 1.12.0
[mothur.git] / mothur.cpp
index 6e61f8796b9d2256de9773d9621174cc677c8ad2..a95c381658009f988e6caff879181a9412851c3d 100644 (file)
@@ -73,7 +73,18 @@ int main(int argc, char *argv[]){
                
                #ifdef MOTHUR_FILES
                        string temp = MOTHUR_FILES; 
+                       
+                       //add / to name if needed
+                       string lastChar = temp.substr(temp.length()-1);
+                       #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+                               if (lastChar != "/") { temp += "/"; }
+                       #else
+                               if (lastChar != "\\") { temp += "\\"; } 
+                       #endif
+                       
+                       temp = getFullPathName(temp);
                        m->setDefaultPath(temp);
+                       
                        m->mothurOutJustToLog("Using default file location " + temp);
                        m->mothurOutEndLine(); m->mothurOutEndLine();
                #endif