diff --git a/src/installer/corehost/common/pal.unix.cpp b/src/installer/corehost/common/pal.unix.cpp index 8159130afc86cb..c98f562b3a4f12 100644 --- a/src/installer/corehost/common/pal.unix.cpp +++ b/src/installer/corehost/common/pal.unix.cpp @@ -744,12 +744,7 @@ bool pal::realpath(pal::string_t* path, bool skip_error_logging) bool pal::file_exists(const pal::string_t& path) { - if (path.empty()) - { - return false; - } - struct stat buffer; - return (::stat(path.c_str(), &buffer) == 0); + return (::access(path.c_str(), F_OK) == 0); } static void readdir(const pal::string_t& path, const pal::string_t& pattern, bool onlydirectories, std::vector* list)