Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c63cb070 authored by liwugang's avatar liwugang Committed by Elliott Hughes
Browse files

libbase: return different result depend on the errno



In the RemoveFileIfExists it always return true even if error appeared
when using stat function.

It should distinguish different error. Such as ENOENT and ENOTDIR
we exactly know the file does not exist. But EACCES(current user has not
all search permission in the file path) and other errors appeared
we can't know whether file exits. So we should return false indicate
there are some error appeared.

Test: ran unit tests
Change-Id: I75788bf0621040812413d52596b5effb628fd0b1
Signed-off-by: default avatarliwugang <liwugang@xiaomi.com>
parent 09738138
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment