@@ -176,13 +176,17 @@ bool FSPermission::is_granted(Environment* env,
|
176 | 176 | case PermissionScope::kFileSystem: |
177 | 177 | return allow_all_in_ && allow_all_out_; |
178 | 178 | case PermissionScope::kFileSystemRead: |
| 179 | +if (param.empty()) { |
| 180 | +return allow_all_in_; |
| 181 | + } |
179 | 182 | return !deny_all_in_ && |
180 | | - ((param.empty() && allow_all_in_) || allow_all_in_ || |
181 | | -is_tree_granted(env, &granted_in_fs_, param)); |
| 183 | + (allow_all_in_ || is_tree_granted(env, &granted_in_fs_, param)); |
182 | 184 | case PermissionScope::kFileSystemWrite: |
| 185 | +if (param.empty()) { |
| 186 | +return allow_all_out_; |
| 187 | + } |
183 | 188 | return !deny_all_out_ && |
184 | | - ((param.empty() && allow_all_out_) || allow_all_out_ || |
185 | | -is_tree_granted(env, &granted_out_fs_, param)); |
| 189 | + (allow_all_out_ || is_tree_granted(env, &granted_out_fs_, param)); |
186 | 190 | default: |
187 | 191 | return false; |
188 | 192 | } |
|