1
1
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:
Chip Senkbeil 2023-05-26 17:16:22 -05:00 committed by Wez Furlong
parent 856c1ae371
commit f88f1aa58a

View File

@ -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