diff --git a/dumper/src/main.rs b/dumper/src/main.rs index 5d96cb7..6e9ca63 100644 --- a/dumper/src/main.rs +++ b/dumper/src/main.rs @@ -226,14 +226,12 @@ unsafe fn dump_mount(k: K, fd: c_int, mp: *mut K::Mount, lock: MtxLoc }; // Write type and path. - if !p.path.is_empty() { - if !write_dump(k, fd, &[ty.into()]) { - return false; - } + if !write_dump(k, fd, &[ty.into()]) { + return false; + } - if !write_dump(k, fd, &p.path) { - return false; - } + if !write_dump(k, fd, &p.path.len().to_le_bytes()) || !write_dump(k, fd, &p.path) { + return false; } // Dump.