]> git.eshelyaron.com Git - emacs.git/commitdiff
Encode and decode filenames correctly on Haiku
authorPo Lu <luangruo@yahoo.com>
Wed, 4 May 2022 03:26:28 +0000 (03:26 +0000)
committerPo Lu <luangruo@yahoo.com>
Wed, 4 May 2022 03:32:23 +0000 (03:32 +0000)
* src/haikufns.c (Fhaiku_read_file_name): Decode file names
correctly.

src/haikufns.c

index 3e3104193e08dd2d99e9a1a712528d3e0f3b2b76..bee41e4ec0aea5744f152bf2391057a58e91ba38 100644 (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,