run_program_conf.h

163: readable_file_name_set => writable_file_name_set
This commit is contained in:
daklqw 2021-04-15 20:56:07 +08:00 committed by GitHub
parent 230738b770
commit 421a251ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,7 @@ inline bool is_writable_file(string name) {
if (name == "/") { if (name == "/") {
return writable_file_name_set.count("system_root"); return writable_file_name_set.count("system_root");
} }
return is_in_set_smart(name, writable_file_name_set) || is_in_set_smart(realpath(name), readable_file_name_set); return is_in_set_smart(name, writable_file_name_set) || is_in_set_smart(realpath(name), writable_file_name_set);
} }
inline bool is_readable_file(const string &name) { inline bool is_readable_file(const string &name) {
if (is_writable_file(name)) { if (is_writable_file(name)) {