aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_vfs/src/lib.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-26 12:41:52 +0000
committerAleksey Kladov <[email protected]>2019-01-26 12:41:52 +0000
commit07a4b9f1a0c36c6bff4b0dbaaeaa93baea8b1f0e (patch)
tree6635a8619836d0c0b262ec095f50bc9668f24436 /crates/ra_vfs/src/lib.rs
parent2acaa92c93bcd54d97221d0cede8780ff817476e (diff)
dont overwrite memfies
Diffstat (limited to 'crates/ra_vfs/src/lib.rs')
-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) {