ww: restrict command self-import exception
This commit is contained in:
@@ -1256,7 +1256,8 @@ sep_scan_file(struct sepgraph *g, int pi, const char *file,
|
||||
free(canon);
|
||||
if (self
|
||||
&& (sep_external_production_name(&g->pkg[pi], name, 1)
|
||||
|| sep_command_declared_name(&g->pkg[pi])))
|
||||
|| (g->pkg[pi].variant == SEP_VARIANT_EXTERNAL
|
||||
&& sep_command_declared_name(&g->pkg[pi]))))
|
||||
external_production = 1;
|
||||
if (self && !external_production) {
|
||||
const char *owner = g->pkg[pi].path[0]
|
||||
|
||||
@@ -1486,7 +1486,8 @@ fn sepscanfile(g: *sepgraph, pi: i32, file: *u8, searchpath: *u8,
|
||||
let self: bool = os.samefile(pathstr(ipath),
|
||||
pathstr(g.pkg[pi].entry));
|
||||
if (self && (sepexternalname(&g.pkg[pi], idp, idn, true)
|
||||
|| sepcommanddeclaredname(&g.pkg[pi]))) {
|
||||
|| (g.pkg[pi].variant == SEP_VARIANT_EXTERNAL
|
||||
&& sepcommanddeclaredname(&g.pkg[pi])))) {
|
||||
externalproduction = true;
|
||||
};
|
||||
if (self && !externalproduction) {
|
||||
|
||||
Reference in New Issue
Block a user