diff --git a/vlib/v/util/module.v b/vlib/v/util/module.v index 3f50bfe079..37ab820266 100644 --- a/vlib/v/util/module.v +++ b/vlib/v/util/module.v @@ -36,6 +36,11 @@ pub fn qualify_module(mod string, file_path string) string { return mod } clean_file_path := file_path.all_before_last('/') + // relative module (relative to working directory) + // TODO: find most stable solution & test with -usecache + if clean_file_path.replace(os.getwd() + os.path_separator, '') == mod { + return mod + } if m1 := mod_path_to_full_name(mod, clean_file_path) { $if trace_mod_path_to_full_name ? { trace_mod_path_to_full_name(@LINE, mod, clean_file_path, m1)