fix error message on missing absolute base path

This commit is contained in:
dzaima 2024-11-23 06:19:39 +02:00
parent 79cffc5011
commit 58f96abe8c
2 changed files with 2 additions and 1 deletions

View File

@ -122,7 +122,7 @@ B path_rel(B base, B rel, char* name) {
if (!isStr(rel)) thrF("%U: Path must be a list of characters", name);
usz ria = IA(rel);
if (ria>0 && isAbsolutePath(rel)) return rel;
if (q_N(base)) thrM("%U: Using relative path with no absolute base path known");
if (q_N(base)) thrF("%U: Using relative path with no absolute base path known", name);
if (ria==0) { dec(rel); return incG(base); }
usz bia = IA(base);
if (bia==0) return rel;

View File

@ -25,6 +25,7 @@
!"Failed to resolve ""path that doesn't exist"": No such file or directory" % "path that doesn't exist"•BQN"•path"
!"Failed to resolve ""path that doesn't exist"": No such file or directory" % "path that doesn't exist"•BQN"•state"
"path that doesn't exist"•BQN"2+2" %% 4
!"•file.Chars: Using relative path with no absolute base path known" % f•BQN"•FChars" F "a"
# •ReBQN
!"REPL: Filename must be a string" % f•ReBQN{} •path, 12 F "2+2"