Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- Configuration changes are now correctly tracked with the pull-model, and the
server should correctly update most settings without a restart on config
change.
- Fixed issue where server could crash in rare cases when opening a file

## 0.9.9
- Fixed an issue that could cause analysis thread crash when an object was declared both
Expand Down
5 changes: 3 additions & 2 deletions src/actions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,13 @@ impl <O: Output> InitActionContext<O> {
}

fn add_direct_open(&self, path: PathBuf) {
let canon_path: CanonPath = path.into();
// NOTE: from_path_buf already logs the error, no need to do it here
let Some(canon_path) = CanonPath::from_path_buf(path) else { return };
self.direct_opens.lock().unwrap().insert(canon_path);
}

fn remove_direct_open(&self, path: PathBuf) {
let canon_path: CanonPath = path.into();
let Some(canon_path) = CanonPath::from_path_buf(path) else { return };
if !self.direct_opens.lock().unwrap().remove(&canon_path) {
debug!("Tried to remove a directly opened file ({:?}) \
that wasnt tracked", canon_path);
Expand Down