]> git.donarmstrong.com Git - mothur.git/blobdiff - mothur.h
added distance search method to classify.seqs
[mothur.git] / mothur.h
index 6381e51d626246244b5ce077b9b077337cfc42d8..8065dd4cc74284f11dbca4808eb2c8893a74b7c8 100644 (file)
--- a/mothur.h
+++ b/mothur.h
@@ -489,7 +489,7 @@ inline bool isBlank(string fileName){
 inline string getFullPathName(string fileName){
        
        string path = hasPath(fileName);
-       string newFileName = getSimpleName(fileName);
+       string newFileName;
        int pos;
        
        if (path == "") { return fileName; } //its a simple name
@@ -501,6 +501,7 @@ inline string getFullPathName(string fileName){
                //get current working directory 
                #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)   
                        if (path.rfind("./") == -1) { return fileName; } //already complete name
+                       else { newFileName = fileName.substr(fileName.rfind("./")+2); } //save the complete part of the name
                        
                        char* cwdpath;
                        size_t size;
@@ -543,6 +544,7 @@ inline string getFullPathName(string fileName){
                                
                #else
                        if (path.rfind(".\\") == -1) { return fileName; } //already complete name
+                       else { newFileName = fileName.substr(fileName.rfind(".\\")+2); } //save the complete part of the name
                                                
                        char *cwdpath = NULL;
                        cwdpath = getcwd(NULL, 0); // or _getcwd