diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js
index a4e4826daf3b292f285c45be17506af368f92755..d0dfbda3f2260b620f34b0d07b3d04064b241c89 100644
--- a/pd/nw/pdgui.js
+++ b/pd/nw/pdgui.js
@@ -695,7 +695,7 @@ function open_file(file) {
     }
     if (basename.match(/\.(pd|pat|mxt)$/i) != null) {
         pdsend("pd open", enquote(basename),
-            defunkify_for_windows(enquote(directory)));
+            defunkify_windows_path(enquote(directory)));
         pd_opendir = directory;
         //::pd_guiprefs::update_recentfiles "$filename" 1
     }
@@ -738,7 +738,7 @@ function doc_open (dir, basename) {
 
     } else {
         pdsend("pd open", enquote(basename),
-            defunkify_for_windows(enquote(norm_path)));
+            defunkify_windows_path(enquote(norm_path)));
     }
 }