Encode and decode filenames correctly on Haiku

* src/haikufns.c (Fhaiku_read_file_name): Decode file names
correctly.
This commit is contained in:
Po Lu 2022-05-04 03:26:28 +00:00
parent b5cf6c1ab6
commit 10284ca3d3

View file

@ -2482,7 +2482,10 @@ Optional arg SAVE_TEXT, if non-nil, specifies some text to show in the entry fie
error ("Trying to use a menu from within a menu-entry");
if (!NILP (dir))
CHECK_STRING (dir);
{
CHECK_STRING (dir);
dir = DECODE_FILE (dir);
}
if (!NILP (save_text))
CHECK_STRING (save_text);
@ -2513,7 +2516,7 @@ Optional arg SAVE_TEXT, if non-nil, specifies some text to show in the entry fie
value = build_string (file_name);
free (file_name);
return value;
return ENCODE_FILE (value);
}
DEFUN ("haiku-put-resource", Fhaiku_put_resource, Shaiku_put_resource,