diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 12:42:14 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-26 12:42:14 +0000 |
commit | 05d0c493c9a94bb6cd4db816fa3bd88d8c389125 (patch) | |
tree | 6635a8619836d0c0b262ec095f50bc9668f24436 /crates/ra_vfs/src | |
parent | 2acaa92c93bcd54d97221d0cede8780ff817476e (diff) | |
parent | 07a4b9f1a0c36c6bff4b0dbaaeaa93baea8b1f0e (diff) |
Merge #672
672: dont overwrite memfies r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Diffstat (limited to 'crates/ra_vfs/src')
-rw-r--r-- | crates/ra_vfs/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_vfs/src/lib.rs b/crates/ra_vfs/src/lib.rs index d1b0222e7..70a13f765 100644 --- a/crates/ra_vfs/src/lib.rs +++ b/crates/ra_vfs/src/lib.rs | |||
@@ -264,7 +264,9 @@ impl Vfs { | |||
264 | self.pending_changes.push(change); | 264 | self.pending_changes.push(change); |
265 | } | 265 | } |
266 | TaskResult::AddSingleFile { root, path, text } => { | 266 | TaskResult::AddSingleFile { root, path, text } => { |
267 | self.do_add_file(root, path, text, false); | 267 | if self.find_file(root, &path).is_none() { |
268 | self.do_add_file(root, path, text, false); | ||
269 | } | ||
268 | } | 270 | } |
269 | TaskResult::ChangeSingleFile { root, path, text } => { | 271 | TaskResult::ChangeSingleFile { root, path, text } => { |
270 | if let Some(file) = self.find_file(root, &path) { | 272 | if let Some(file) = self.find_file(root, &path) { |