Skip to content

Commit

Permalink
fix read only indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Apr 30, 2024
1 parent d1c96ad commit 1584ea6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ferrite-core/src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl Buffer {
metadata.permissions().readonly()
};
#[cfg(unix)]
let read_only_file = nix::unistd::access(path, nix::unistd::AccessFlags::R_OK).is_ok();
let read_only_file = !nix::unistd::access(path, nix::unistd::AccessFlags::W_OK).is_ok();
let (encoding, rope) = read::read_from_file(path)?;

let mut syntax = Syntax::new(get_buffer_proxy());
Expand Down

0 comments on commit 1584ea6

Please sign in to comment.