27 lines
881 B
Diff
27 lines
881 B
Diff
From 45b91002a3c8fa7c4e96db8154354be1cd4296bb Mon Sep 17 00:00:00 2001
|
|
From: gaohuatao <gaohuatao@huawei.com>
|
|
Date: Mon, 2 Nov 2020 08:58:04 +0800
|
|
Subject: [PATCH 17/28] add unlink dir comments
|
|
|
|
Signed-off-by: gaohuatao <gaohuatao@huawei.com>
|
|
---
|
|
src/daemon/modules/service/service_container.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/daemon/modules/service/service_container.c b/src/daemon/modules/service/service_container.c
|
|
index cc4e85e..7a89618 100644
|
|
--- a/src/daemon/modules/service/service_container.c
|
|
+++ b/src/daemon/modules/service/service_container.c
|
|
@@ -129,7 +129,7 @@ static int create_mtab_link(const oci_runtime_spec *oci_spec)
|
|
ret = -1;
|
|
goto out;
|
|
}
|
|
-
|
|
+ // When dir is symbol link, unlink dir to assure creating dir success following
|
|
(void)unlink(dir);
|
|
|
|
if (!util_dir_exists(dir)) {
|
|
--
|
|
2.20.1
|
|
|