fix: check createDir return value

Added a check in the createDir function to verify if the file exists
(this is not an error)

Signed-off-by: Marcel Skierkowski <marcel.skierkowski@intel.com>
This commit is contained in:
Marcel Skierkowski
2025-04-29 14:46:05 +00:00
committed by Compute-Runtime-Automation
parent 523e53c862
commit c54c88c7f6

View File

@@ -1655,7 +1655,12 @@ void OfflineCompiler::writeOutAllFiles() {
int OfflineCompiler::createDir(const std::string &path) {
auto result = IoFunctions::mkdirPtr(path.c_str());
if (result != 0) {
return OCLOC_INVALID_FILE;
if (errno == EEXIST) {
// Directory already exists, not an error
return OCLOC_SUCCESS;
} else {
return OCLOC_INVALID_FILE;
}
}
return OCLOC_SUCCESS;
}