28 lines
904 B
Diff
28 lines
904 B
Diff
From 2bd45202ef01260a2181270012c4781afd5cccba Mon Sep 17 00:00:00 2001
|
|
From: zhangsong234 <zhangsong34@huawei.com>
|
|
Date: Mon, 1 Feb 2021 09:25:51 +0800
|
|
Subject: [PATCH 23/53] Fix create env path dir if dir exist
|
|
|
|
---
|
|
src/daemon/modules/service/service_container.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/daemon/modules/service/service_container.c b/src/daemon/modules/service/service_container.c
|
|
index 0c1f234e..5fbb06a2 100644
|
|
--- a/src/daemon/modules/service/service_container.c
|
|
+++ b/src/daemon/modules/service/service_container.c
|
|
@@ -291,7 +291,9 @@ static int create_env_path_dir(const char *env_path)
|
|
free(dir);
|
|
return 0;
|
|
}
|
|
- ret = util_mkdir_p(dir, DEFAULT_SECURE_DIRECTORY_MODE);
|
|
+ if (!util_dir_exists(dir)) {
|
|
+ ret = util_mkdir_p(dir, DEFAULT_SECURE_DIRECTORY_MODE);
|
|
+ }
|
|
free(dir);
|
|
return ret;
|
|
}
|
|
--
|
|
2.25.1
|
|
|