We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f6cb684 commit 3fdbf4fCopy full SHA for 3fdbf4f
src/init.c
@@ -575,6 +575,14 @@ static char *abspath(const char *in, int nprefix)
575
}
576
577
#else
578
+ // GetFullPathName intentionally errors if given an empty string so manually insert `.`
579
+ if (strlen(in) - nprefix == 0) {
580
+ size_t path_size = JL_PATH_MAX;
581
+ char *in2 = (char*)malloc_s(JL_PATH_MAX);
582
+ memcpy(in2, in, nprefix);
583
+ in2[nprefix+1] = '.';
584
+ in = in2;
585
+ }
586
DWORD n = GetFullPathName(in + nprefix, 0, NULL, NULL);
587
if (n <= 0) {
588
jl_error("fatal error: jl_options.image_file path too long or GetFullPathName failed");
0 commit comments