Commit 22471859 authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Fix include/exclude path for Windows

parent 723c6893
......@@ -297,7 +297,16 @@
if(exclude && !restore) {
var args = exclude.split(",");
$.each(args, function(i, value) {
exclude_arg += " --exclude '" + value + "' ";
if(process.platform == 'win32') {
exec(CYGWIN_BASH + " -c \"/usr/bin/cygpath '" + value + "' \"",
function(error, stdout, stderr) {
if(error) $("#msg").html(error);
var win_value = String(stdout).replace(/(\r\n|\n|\r)/gm, "");
exclude_arg += " --exclude '" + win_value + "' ";
});
} else {
exclude_arg += " --exclude '" + value + "' ";
}
});
}
......@@ -306,7 +315,16 @@
if(include && !restore) {
var args = include.split(",");
$.each(args, function(i, value) {
include_arg += " --include '" + value + "' ";
if(process.platform == 'win32') {
exec(CYGWIN_BASH + " -c \"/usr/bin/cygpath '" + value + "' \"",
function(error, stdout, stderr) {
if(error) $("#msg").html(error);
var win_value = String(stdout).replace(/(\r\n|\n|\r)/gm, "");
include_arg += " --include '" + win_value + "' ";
});
} else {
include_arg += " --include '" + value + "' ";
}
});
}
......
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