mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
fix: windows cl_cache fixes and improvements
Fixed the function that checks if a directory exists. Added debug message in case config file creation fails. Simplified setting pattern for searching all files in a directory. Adding file search loop skip when found file is a directory. Fixes: #762 Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dd8460beba
commit
e30b8c0300
@@ -47,7 +47,11 @@ DWORD getLastError() {
|
||||
bool pathExists(const std::string &path) {
|
||||
DWORD ret = GetFileAttributesA(path.c_str());
|
||||
|
||||
return ret == FILE_ATTRIBUTE_DIRECTORY;
|
||||
if (ret == INVALID_FILE_ATTRIBUTES) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (ret & FILE_ATTRIBUTE_DIRECTORY) != 0;
|
||||
}
|
||||
|
||||
HANDLE createEvent(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) {
|
||||
|
||||
Reference in New Issue
Block a user