Commit 1a020c36 authored by Efthymia Bika's avatar Efthymia Bika
Browse files

Find timeview.py in Windows exec_path

parent 746cd1fb
......@@ -119,13 +119,21 @@ function get_contents_by_date(value) {
init_path = time_path;
}
var time_script = path.join(exec_path, 'timeview.py');
var time_cmd = "python " + time_script + " timeviews/ swift://" +
container + " get " + value + " '" + time_path + "'"
if(process.platform == 'win32') {
var cmd = build_win_commands();
exec(CYGWIN_BASH + " -c '" + cmd + time_dup_cmd + "'",
show_contents_by_date);
time_script = time_script.replace(/\\/g, "\\\\");
exec(CYGWIN_BASH + " -c \"/usr/bin/cygpath '" + time_script + "' \"",
function(error, stdout, stderr) {
time_script = String(stdout).replace(/(\r\n|\n|\r)/gm, "");
if(error) $("#msg").html(error);
var cmd = build_win_commands();
var time_cmd = "python " + time_script + " timeviews/ swift://" +
container + " get " + value + " '" + time_path + "'"
exec(CYGWIN_BASH + " -c '" + cmd + time_cmd + "'",
show_contents_by_date);
});
} else {
var time_cmd = "python " + time_script + " timeviews/ swift://" +
container + " get " + value + " '" + time_path + "'"
exec(time_cmd, show_contents_by_date);
}
}
......
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