]> git.donarmstrong.com Git - mothur.git/blobdiff - mothurout.cpp
fixed a trimming bug in sffinfo which occurs when the right trim point is smaller...
[mothur.git] / mothurout.cpp
index 95b523e8a4a71056c782ae8319568eead3240fde..d3f8e7af788563fa1dd89a401c027175377a98dc 100644 (file)
@@ -40,6 +40,26 @@ void MothurOut::setFileName(string filename)  {
        }\r
 }\r
 /*********************************************************************************************/\r
+void MothurOut::setDefaultPath(string pathname)  {\r
+       try {\r
+       \r
+               //add / to name if needed\r
+               string lastChar = pathname.substr(pathname.length()-1);\r
+               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)\r
+                       if (lastChar != "/") { pathname += "/"; }\r
+               #else\r
+                       if (lastChar != "\\") { pathname += "\\"; }     \r
+               #endif\r
+               \r
+               defaultPath = pathname;\r
+               \r
+       }\r
+       catch(exception& e) {\r
+               errorOut(e, "MothurOut", "setDefaultPath");\r
+               exit(1);\r
+       }\r
+}\r
+/*********************************************************************************************/\r
 void MothurOut::closeLog()  {\r
        try {\r
                \r
@@ -142,7 +162,7 @@ void MothurOut::mothurOutJustToLog(string output) {
 /*********************************************************************************************/\r
 void MothurOut::errorOut(exception& e, string object, string function) {\r
        double vm, rss;\r
-       mem_usage(vm, rss);\r
+       //mem_usage(vm, rss);\r
        \r
        mothurOut("Error: ");\r
        mothurOut(toString(e.what()));\r