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
//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;
#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