add missed directory separators

This commit is contained in:
yggverse 2025-07-09 19:09:21 +03:00
parent 7306a29d1e
commit 7592f7a106

View file

@ -359,8 +359,22 @@ fn list(info: &TorrentMetaV1Info<ByteBufOwned>, limit: usize) -> Option<Vec<(Str
t += 1; t += 1;
if t < limit { if t < limit {
b.push(( b.push((
String::from_utf8(f.path.iter().flat_map(|b| b.0.to_vec()).collect()) String::from_utf8(
.unwrap_or_default(), f.path
.iter()
.enumerate()
.flat_map(|(n, b)| {
if n == 0 {
b.0.to_vec()
} else {
let mut p = vec![b'/'];
p.extend(b.0.to_vec());
p
}
})
.collect(),
)
.unwrap_or_default(),
f.length, f.length,
)); ));
continue; continue;