Skip to content

Commit

Permalink
FIX: correctly handling file argument of BROWSE function on Windows
Browse files Browse the repository at this point in the history
When passing file to BROWSE function, it must be first converted to full local path.

Fixes: metaeducation/rebol-issues#2350
  • Loading branch information
Oldes committed Jan 16, 2019
1 parent 22bd6ad commit b017f81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/n-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,12 @@ static REBSER *Read_All_File(char *fname)
if (IS_NONE(arg))
return R_UNSET;

url = Val_Str_To_OS(arg);
if(IS_FILE(arg)) {
// Convert file to full local os path
url = UNI_HEAD(Value_To_OS_Path(arg, TRUE));
} else {
url = Val_Str_To_OS(arg);
}

r = OS_BROWSE(url, 0);

Expand Down

0 comments on commit b017f81

Please sign in to comment.