Fix wrong filename paremeter 41/320141/1 tizen_6.5
authorChanggyu Choi <changyu.choi@samsung.com>
Mon, 5 Dec 2022 08:19:54 +0000 (17:19 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Fri, 8 Nov 2024 06:38:42 +0000 (06:38 +0000)
If tool try to remove the directory, the parameter is wrong.
This patch changes the parameter by correcting it.

Change-Id: If0332966b94d0520f50d1143812449104959f248
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
(cherry picked from commit dfbc252fd6c5fd3bc8a88968ec8ad562d5df2164)

src/pkg_cleardata/pkg_cleardata.c

index 203366fdbab7652600868c021254ccc3f425aa09..ebbf6b80440a781875a205614f5d4badde3050c4 100644 (file)
@@ -433,7 +433,7 @@ static int __remove_file(const char *pkgid, const char *file_path)
                perror(filename);
 
        if (S_ISDIR(st_file_info.st_mode)) {
-               ret = __clear_dir(file_path);
+               ret = __clear_dir(filename);
                if (ret != 0) {
                        LOGE("Couldn't remove the directory. errno : %d (%s)",
                                errno, strerror_r(errno, buf, sizeof(buf)));