Bugfix: we can't check for executability of post-processing scripts on Windows. #2616

This commit is contained in:
Alessandro Ranellucci 2015-03-02 21:48:29 +01:00
parent 70c032868a
commit 9d435c8f4d

View file

@ -89,7 +89,8 @@ sub export_gcode {
$self->config->setenv;
for my $script (@{$self->config->post_process}) {
Slic3r::debugf " '%s' '%s'\n", $script, $output_file;
if (!-x $script) {
# -x doesn't return true on Windows except for .exe files
if (($^O eq 'MSWin32') ? !(-e $script) : !(-x $script)) {
die "The configured post-processing script is not executable: check permissions. ($script)\n";
}
system($script, $output_file);