From 9d435c8f4d4e1f932fbb5e37cdca163d0bb316ea Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 2 Mar 2015 21:48:29 +0100 Subject: [PATCH] Bugfix: we can't check for executability of post-processing scripts on Windows. #2616 --- lib/Slic3r/Print.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index ca18ff9769..cd03fc265c 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -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);