| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - // Flags: --permission --allow-fs-read=* | ||
| 1 | + // Flags: --permission --allow-fs-read=* --allow-fs-write=. | ||
| 2 | 2 | 'use strict'; | |
| 3 | 3 | ||
| 4 | 4 | const common = require('../common'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments