Show More
@@ -57,9 +57,11 b' impl Node {' | |||||
57 | let head = split.next().unwrap_or(b""); |
|
57 | let head = split.next().unwrap_or(b""); | |
58 | let tail = split.next().unwrap_or(b""); |
|
58 | let tail = split.next().unwrap_or(b""); | |
59 |
|
59 | |||
|
60 | // Are we're modifying the current file ? Is the the end of the path ? | |||
|
61 | let is_current_file = tail.is_empty() && head.is_empty(); | |||
|
62 | ||||
60 | if let NodeKind::File(file) = &mut self.kind { |
|
63 | if let NodeKind::File(file) = &mut self.kind { | |
61 | if tail.is_empty() && head.is_empty() { |
|
64 | if is_current_file { | |
62 | // We're modifying the current file |
|
|||
63 | let new = Self { |
|
65 | let new = Self { | |
64 | kind: NodeKind::File(File { |
|
66 | kind: NodeKind::File(File { | |
65 | entry: new_entry, |
|
67 | entry: new_entry, |
General Comments 0
You need to be logged in to leave comments.
Login now