mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Fix bad assertion in scan.zig:addSpecial()
While it's true that the root item can't be a special, the first item to be added is not necessarily the root item. In particular, it isn't when refreshing. Probably fixes #194
This commit is contained in:
parent
3942722eba
commit
5f383966a9
1 changed files with 0 additions and 2 deletions
|
|
@ -379,8 +379,6 @@ const Context = struct {
|
|||
// Insert the current path as a special entry (i.e. a file/dir that is not counted)
|
||||
// Ignores self.stat except for the 'dir' option.
|
||||
fn addSpecial(self: *Self, t: Special) void {
|
||||
std.debug.assert(self.items_seen > 0); // root item can't be a special
|
||||
|
||||
if (t == .err) {
|
||||
if (self.last_error) |p| main.allocator.free(p);
|
||||
self.last_error = main.allocator.dupeZ(u8, self.path.items) catch unreachable;
|
||||
|
|
|
|||
Loading…
Reference in a new issue