diff --git a/universal7885-common/apps/aidl-support/parts/default/Swap.cpp b/universal7885-common/apps/aidl-support/parts/default/Swap.cpp index b6d7434..d60378f 100644 --- a/universal7885-common/apps/aidl-support/parts/default/Swap.cpp +++ b/universal7885-common/apps/aidl-support/parts/default/Swap.cpp @@ -112,7 +112,7 @@ namespace aidl::vendor::eureka::hardware::parts { static std::mutex thread_lock; -static inline bool swapfile_exist(void) { return access(SWAP_PATH, F_OK) == 0; } +static inline bool swapfile_exist(void) { return access(SWAP_PATH, R_OK | W_OK) == 0; } static void makeFile(int32_t mSwapSize) { const std::lock_guard lock(thread_lock);