Include the directory itself when allowing reading
Don't kill the script on a denied directory read
#endif
read_allowed_paths.push_back(fg_root + sep + "*");
read_allowed_paths.push_back(fg_home + sep + "*");
+ read_allowed_paths.push_back(fg_root);
+ read_allowed_paths.push_back(fg_home);
string_list const aircraft_paths = globals->get_aircraft_paths();
string_list const scenery_paths = globals->get_secure_fg_scenery();
// not plain fg_scenery, to avoid making
exit(-1);
}
read_allowed_paths.push_back(SGPath(*it).realpath() + sep + "*");
+ read_allowed_paths.push_back(SGPath(*it).realpath());
}
}
naStr_data(args[0]) << "' denied (unauthorized directory - authorization"
" no longer follows symlinks; to authorize reading additional "
"directories, add them to --fg-aircraft)");
- naRuntimeError(c, "directory(): access denied (unauthorized directory)");
+ // to avoid breaking dialogs, pretend it doesn't exist rather than erroring out
return naNil();
}