1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-15 10:26:39 +00:00
termux-packages/packages/kak-lsp/src-text_edit.rs.patch
2021-08-19 03:09:06 +05:30

14 lines
565 B
Diff

diff --git a/src/text_edit.rs b/src/text_edit.rs
index 78797ef..6de790c 100644
--- a/src/text_edit.rs
+++ b/src/text_edit.rs
@@ -108,7 +108,7 @@ pub fn apply_text_edits_to_file(
apply_text_edits_to_file_impl(text, temp_file, text_edits, offset_encoding)
.and_then(|_| std::fs::rename(&temp_path, filename))
.map(|_| unsafe {
- libc::chmod(path.as_ptr(), stat.st_mode);
+ libc::chmod(path.as_ptr(), stat.st_mode as libc::mode_t);
})
.map_err(|e| {
let _ = std::fs::remove_file(&temp_path);