aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_vfs/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_vfs/src')
-rw-r--r--crates/ra_vfs/src/lib.rs4
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) {