From 2ef8853c37001f4c3442acaa92cf3704cb5e9bac Mon Sep 17 00:00:00 2001 From: Tedd Ho-Jeong An Date: Tue, 7 Jun 2022 22:14:18 -0700 Subject: [PATCH] device: Fix not deleting the folder after removing the device This patch fixes the issue not deleting the device folder when the device is removed. Signed-off-by: Manika Shrivastava Signed-off-by: Ayush Garg --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 7c3686c..60f13a0 100644 --- a/src/device.c +++ b/src/device.c @@ -6904,7 +6904,7 @@ static void delete_folder_tree(const char *dirname) if (entry->d_type == DT_UNKNOWN) entry->d_type = util_get_dt(dirname, entry->d_name); - create_filename(filename, PATH_MAX, "%s/%s", dirname, + snprintf(filename, PATH_MAX, "%s/%s", dirname, entry->d_name); if (entry->d_type == DT_DIR) -- 2.7.4