SCOPE_EXIT {
free(real_path);
};
- if ((nullptr == real_path && EACCES == errno) ||
- (-1 == stat(real_path, &buf) && EACCES == errno)) {
+ if ((nullptr == real_path || -1 == stat(real_path, &buf)) && (EACCES == errno)) {
LoggerE("The application does not have necessary privilege to access given file: [%s]",
path.c_str());
return PlatformResult(ErrorCode::SECURITY_ERR,
SCOPE_EXIT {
free(real_path);
};
- if ((nullptr == real_path && EACCES == errno) ||
- (-1 == stat(real_path, &buf) && EACCES == errno)) {
+ if ((nullptr == real_path || -1 == stat(real_path, &buf)) && (EACCES == errno)) {
LoggerE("The application does not have necessary privilege to access given file: [%s]",
path.c_str());
return SecurityError("Permission denied: accessing files requires proper storage privilege");