30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
From 4683b40fd9a8ed9ae747b7b7add1de963cc80c4e Mon Sep 17 00:00:00 2001
|
|
From: zhangyao <zhangyao108@huawei.com>
|
|
Date: Tue, 6 Sep 2022 09:21:15 +0800
|
|
Subject: [PATCH 2/4] fix dropin: get real file name
|
|
|
|
---
|
|
process1/src/manager/unit/uload_util/unit_file.rs | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/process1/src/manager/unit/uload_util/unit_file.rs b/process1/src/manager/unit/uload_util/unit_file.rs
|
|
index 9fae099..928ff20 100755
|
|
--- a/process1/src/manager/unit/uload_util/unit_file.rs
|
|
+++ b/process1/src/manager/unit/uload_util/unit_file.rs
|
|
@@ -139,7 +139,11 @@ impl UnitFileData {
|
|
for entry in dir.read_dir().unwrap() {
|
|
let dropin = entry.unwrap().path();
|
|
if dropin.is_symlink() {
|
|
- pathbuf_dropin.push(dropin);
|
|
+ if let Ok(abs_path) = dropin.canonicalize() {
|
|
+ let mut file_name = PathBuf::new();
|
|
+ file_name.push(abs_path.file_name().unwrap());
|
|
+ pathbuf_dropin.push(file_name);
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
--
|
|
2.30.2
|
|
|