quick get_canonical_filename version for win32

This commit is contained in:
ps 2011-01-17 20:43:22 +00:00
parent 9adb553f14
commit 4853a7ca47

View file

@ -362,6 +362,16 @@ bool Utils::file_exists(string file)
}
}
#ifdef WIN32
string Utils::get_canonical_filename(string file)
{
char buffer[MAX_PATH];
GetFullPathName(file.c_str(),sizeof(path),path,NULL);
return string(buffer);
}
#else
string Utils::get_canonical_filename(string file)
{
char *buffer=NULL;
@ -373,6 +383,7 @@ string Utils::get_canonical_filename(string file)
return result;
}
#endif //WIN32
/**
* whether a directory is accesible by current process/user
*