mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
Add default-enabled error log when there is a corrupted history entry
We'll drop the corrupted item on the next vacuum, so this shouldn't be too annoying, and hopefully helps to narrow down #10300 further.
This commit is contained in:
parent
9c4d31f89a
commit
efa109b62e
1 changed files with 9 additions and 0 deletions
|
@ -494,6 +494,15 @@ fn offset_of_next_item_fish_2_0(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if line.starts_with(b"\0") {
|
||||||
|
FLOG!(
|
||||||
|
error,
|
||||||
|
"ignoring corrupted history entry around offset",
|
||||||
|
*cursor
|
||||||
|
);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if !line.starts_with(b"- cmd") {
|
if !line.starts_with(b"- cmd") {
|
||||||
FLOG!(
|
FLOG!(
|
||||||
history,
|
history,
|
||||||
|
|
Loading…
Reference in a new issue