Commit 51433563 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix jwilkes/purr-data#65

normalize Windows path before sending it to Pd
parent e4fc94e8
......@@ -14,7 +14,11 @@ exports.get_pwd = function() {
}
function defunkify_windows_path(s) {
return s.replace(/\\/g, "/");
var ret = s;
if (process.platform === "win32") {
ret = ret.replace(/\\/g, "/");
}
return ret;
}
exports.defunkify_windows_path = defunkify_windows_path;
......@@ -487,7 +491,7 @@ function menu_new () {
untitled_directory = pwd;
pdsend("pd filename",
"Untitled-" + untitled_number,
enquote(untitled_directory));
enquote(defunkify_windows_path(untitled_directory)));
// I don't think k12_mode works yet. Need to test this.
if (k12_mode == 1) {
k12_saveas_on_new = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment