mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
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:
committed by
Compute-Runtime-Automation
parent
c7cb71e174
commit
0ef6b9b64c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user