Zebin manipulator - create dump directory fix

This commit fixes problem in zebin manipulator when dump was not
created.
* Explicitly create dump directory.
* Add slash to dump argument.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
Krystian Chmielewski
2022-10-21 10:58:50 +00:00
committed by Compute-Runtime-Automation
parent c7cb71e174
commit 0ef6b9b64c
8 changed files with 53 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -9,10 +9,12 @@
#include <cstdio>
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
namespace NEO {
namespace NEO::Directory {
std::vector<std::string> Directory::getFiles(const std::string &path) {
std::vector<std::string> getFiles(const std::string &path) {
std::vector<std::string> files;
DIR *dir = opendir(path.c_str());
@@ -37,4 +39,9 @@ std::vector<std::string> Directory::getFiles(const std::string &path) {
closedir(dir);
return files;
}
}; // namespace NEO
void createDirectory(const std::string &path) {
const mode_t mode = 0777; // 777 in base 8
mkdir(path.c_str(), mode);
}
}; // namespace NEO::Directory