Use access() instead of std::filesystem::exists 76/302876/2
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 15 Dec 2023 03:34:17 +0000 (12:34 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Fri, 15 Dec 2023 04:22:25 +0000 (04:22 +0000)
commit82ef5e16b3dc0e30588bc73e4caef81fcb7aa5ff
tree083b2eb562c93f414becd96bfda1495849d88d7c
parent742a523eb9647b051a7e0f6512733840dde8e8b8
Use access() instead of std::filesystem::exists

The std::filesystem::exists uses stat() internally. The read permission
is needed to use stat(). It can cause the smack issues.
This patch changes the implementation to using access() with F_OK option.

Change-Id: I367487b010c7abf50015004e86c3bb6ad88aa0e6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/launchpad-glib/util.cc