From 4853a7ca476a9e788af7ffd321ad398df9a29273 Mon Sep 17 00:00:00 2001 From: ps Date: Mon, 17 Jan 2011 20:43:22 +0000 Subject: [PATCH] quick get_canonical_filename version for win32 --- src/Utils.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Utils.cpp b/src/Utils.cpp index 5cf9d2a..783a2bb 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -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 *