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