This commit is contained in:
2025-01-02 08:27:45 -06:00
parent 9cb7f9accf
commit a4a9d069d3

View File

@ -235,6 +235,10 @@ auto file_manager::get_open_file_count(const std::string &api_path) const
auto file_manager::get_open_file(std::uint64_t handle, bool write_supported, auto file_manager::get_open_file(std::uint64_t handle, bool write_supported,
std::shared_ptr<i_open_file> &file) -> bool { std::shared_ptr<i_open_file> &file) -> bool {
if (write_supported && provider_.is_read_only()) {
return false;
}
unique_recur_mutex_lock open_lock(open_file_mtx_); unique_recur_mutex_lock open_lock(open_file_mtx_);
auto file_ptr = get_open_file_by_handle(handle); auto file_ptr = get_open_file_by_handle(handle);
if (not file_ptr) { if (not file_ptr) {