Skip to content

Commit b017f81

Browse files
committed
FIX: correctly handling file argument of BROWSE function on Windows
When passing file to BROWSE function, it must be first converted to full local path. Fixes: metaeducation/rebol-issues#2350
1 parent 22bd6ad commit b017f81

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/core/n-io.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,12 @@ static REBSER *Read_All_File(char *fname)
512512
if (IS_NONE(arg))
513513
return R_UNSET;
514514

515-
url = Val_Str_To_OS(arg);
515+
if(IS_FILE(arg)) {
516+
// Convert file to full local os path
517+
url = UNI_HEAD(Value_To_OS_Path(arg, TRUE));
518+
} else {
519+
url = Val_Str_To_OS(arg);
520+
}
516521

517522
r = OS_BROWSE(url, 0);
518523

0 commit comments

Comments
 (0)