Skip to content

Commit 531788c

Browse files
committed
fixup! src,permission: fix permission.has on empty param
1 parent 1535bdc commit 531788c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/permission/fs_permission.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,13 @@ bool FSPermission::is_granted(Environment* env,
173173
return allow_all_in_;
174174
}
175175
return !deny_all_in_ &&
176-
(allow_all_in_ ||
177-
is_tree_granted(env, &granted_in_fs_, param));
176+
(allow_all_in_ || is_tree_granted(env, &granted_in_fs_, param));
178177
case PermissionScope::kFileSystemWrite:
179178
if (param.empty()) {
180179
return allow_all_out_;
181180
}
182181
return !deny_all_out_ &&
183-
(allow_all_out_ ||
184-
is_tree_granted(env, &granted_out_fs_, param));
182+
(allow_all_out_ || is_tree_granted(env, &granted_out_fs_, param));
185183
default:
186184
return false;
187185
}

0 commit comments

Comments
 (0)