mirror of
https://github.com/wez/wezterm.git
synced 2024-11-26 08:25:50 +03:00
Fix sftp::FilePermissions::is_readonly to properly report readonly status
This commit is contained in:
parent
856c1ae371
commit
f88f1aa58a
@ -91,8 +91,9 @@ pub struct FilePermissions {
|
||||
}
|
||||
|
||||
impl FilePermissions {
|
||||
/// Returns true if all write permissions (owner, group, other) are false.
|
||||
pub fn is_readonly(self) -> bool {
|
||||
!(self.owner_read || self.group_read || self.other_read)
|
||||
!(self.owner_write || self.group_write || self.other_write)
|
||||
}
|
||||
|
||||
/// Create from a unix mode bitset
|
||||
|
Loading…
Reference in New Issue
Block a user