commit: 505ac26c1a2d2b9034d1050e654199d075f909ca
parent fe08f69e3eec4eaff1b0c4783cd3b544f3554258
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 23 Jun 2022 09:49:13 +0200
check_dir: check for . & .. before path join
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/main.ha b/main.ha
@@ -91,13 +91,13 @@ fn check_dir(dirname: str, ignoring: bool) (void | errors::invalid) = {
break;
};
- const filename = path::join(dirname, ent.name);
- defer free(filename);
-
if (ent.name == "." || ent.name == "..") {
continue;
};
+ const filename = path::join(dirname, ent.name);
+ defer free(filename);
+
if (!ignoring) {
ignoring = is_excluded(filename);
};