yanglint BUGFIX cwd in interactive mode
diff --git a/tools/lint/cmd_add.c b/tools/lint/cmd_add.c
index eb58745..38663c2 100644
--- a/tools/lint/cmd_add.c
+++ b/tools/lint/cmd_add.c
@@ -18,7 +18,6 @@
#include "cmd.h"
#include <getopt.h>
-#include <libgen.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -135,7 +134,7 @@
}
/* add temporarily also the path of the module itself */
- if (ly_ctx_set_searchdir(*ctx, dirname(dir)) == LY_EEXIST) {
+ if (ly_ctx_set_searchdir(*ctx, dir) == LY_EEXIST) {
path_unset = 0;
}