diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index 67dce8c0737e7fda21ff4fb057451aeac2e1bc0f..ea0d7e498ea01ed026a6dc36169433bcb229c8ea 100644 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -75,6 +75,10 @@ target_link_libraries(llvfs ${vfs_BOOST_LIBRARIES} ) +if (WINDOWS) + target_link_libraries(llvfs Shlwapi) +endif (WINDOWS) + if (DARWIN) include(CMakeFindFrameworks) find_library(COCOA_LIBRARY Cocoa) diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index aa9aa33af984cfa7a88d9e9f1f47cff311e0c166..73cbf77b17b95d44fda11a49232e183680768898 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -40,6 +40,7 @@ #include <errno.h> #include <sys/types.h> #include <sys/stat.h> +#include <shlwapi.h> // Utility stuff to get versions of the sh #define PACKVERSION(major,minor) MAKELONG(minor,major) @@ -371,20 +372,9 @@ std::string LLDir_Win32::getCurPath() } -bool LLDir_Win32::fileExists(const std::string &filename) const +bool LLDir_Win32::fileExists(const std::string& filename) const { - llstat stat_data; - // Check the age of the file - // Now, we see if the files we've gathered are recent... - int res = LLFile::stat(filename, &stat_data); - if (!res) - { - return TRUE; - } - else - { - return FALSE; - } + return PathFileExists(ll_convert_string_to_wide(filename).c_str()); }