From ae0617c0199f47f36cfb18db678dc6823c5f3ca2 Mon Sep 17 00:00:00 2001
From: Albert Graef <aggraef@gmail.com>
Date: Sat, 11 Feb 2017 23:29:17 +0100
Subject: [PATCH] Defunkify Windows pathnames in the add-recent-file FUDI
 message. Fixes #247.

---
 pd/nw/pdgui.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js
index 301661e3d..140abeda7 100644
--- a/pd/nw/pdgui.js
+++ b/pd/nw/pdgui.js
@@ -735,7 +735,7 @@ function saveas_callback(cid, file, close_flag) {
     set_pd_opendir(directory);
     // update the recent files list
     var norm_path = path.normalize(directory);
-    pdsend("pd add-recent-file", enquote(path.join(norm_path, basename)));
+    pdsend("pd add-recent-file", enquote(defunkify_windows_path(path.join(norm_path, basename))));
 }
 
 exports.saveas_callback = saveas_callback;
@@ -1033,7 +1033,7 @@ function process_file(file, do_open) {
         //::pd_guiprefs::update_recentfiles "$filename" 1
         // update the recent files list
         var norm_path = path.normalize(directory);
-        pdsend("pd add-recent-file", enquote(path.join(norm_path, basename)));
+        pdsend("pd add-recent-file", enquote(defunkify_windows_path(path.join(norm_path, basename))));
     }
 }
 
-- 
GitLab