summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-10-06 14:32:02 +0200
committerYorhel <git@yorhel.nl>2021-10-06 14:32:02 +0200
commit929cc75675830704e6a6ba64860de113cb83bf07 (patch)
treee448d9556e60c57cc4279dc399ae0d7216ff7e96
parentfdb93bb9e646fad0c763be43a53c11b2543bdcbe (diff)
Fix import of "special" dirs and excluded items
-rw-r--r--src/scan.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/scan.zig b/src/scan.zig
index bfa515c..3872a72 100644
--- a/src/scan.zig
+++ b/src/scan.zig
@@ -799,6 +799,7 @@ const Import = struct {
if (eq(u8, typ, "otherfs")) special.* = .other_fs
else if (eq(u8, typ, "kernfs")) special.* = .kernfs
else special.* = .excluded;
+ return;
}
},
'g' => {
@@ -899,7 +900,9 @@ const Import = struct {
fn item(self: *Self, dev: u64) void {
self.ctx.stat = .{};
+ var isdir = false;
if (self.ch == '[') {
+ isdir = true;
self.ctx.stat.dir = true;
self.con();
self.conws();
@@ -908,7 +911,7 @@ const Import = struct {
self.iteminfo(dev);
self.conws();
- if (self.ctx.stat.dir) {
+ if (isdir) {
const ndev = self.ctx.stat.dev;
while (self.ch == ',') {
self.con();