Skip to content

Commit

Permalink
Stop redundantly adding ignore paths when starting ServeSession
Browse files Browse the repository at this point in the history
  • Loading branch information
LPGhatguy committed Jun 18, 2020
1 parent 9453588 commit badb5c3
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/serve_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use crate::{
session_id::SessionId,
snapshot::{
apply_patch_set, compute_patch_set, AppliedPatchSet, InstanceContext,
InstancePropertiesWithMeta, PatchSet, PathIgnoreRule, RojoTree,
InstancePropertiesWithMeta, PatchSet, RojoTree,
},
snapshot_middleware::{snapshot_from_vfs, SnapshotError},
};
Expand Down Expand Up @@ -114,17 +114,7 @@ impl ServeSession {

let root_id = tree.get_root_id();

let mut instance_context = InstanceContext::default();

let rules = root_project
.glob_ignore_paths
.iter()
.map(|glob| PathIgnoreRule {
glob: glob.clone(),
base_path: root_project.folder_location().to_path_buf(),
});

instance_context.add_path_ignore_rules(rules);
let instance_context = InstanceContext::default();

log::trace!("Generating snapshot of instances from VFS");
let snapshot = snapshot_from_vfs(&instance_context, &vfs, &start_path)?
Expand Down

0 comments on commit badb5c3

Please sign in to comment.