From 35da87a90a57d6ae633844dc57d003ca8a4d11d3 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 17 Jan 2015 10:50:34 +0100 Subject: [PATCH] Check whether the configured post-processing scripts are executable and show an error when they aren't --- lib/Slic3r/Print.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index cc2c97221..f8d9d4929 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -87,9 +87,12 @@ sub export_gcode { if (@{$self->config->post_process}) { $self->status_cb->(95, "Running post-processing scripts"); $self->config->setenv; - for (@{$self->config->post_process}) { - Slic3r::debugf " '%s' '%s'\n", $_, $output_file; - system($_, $output_file); + for my $script (@{$self->config->post_process}) { + Slic3r::debugf " '%s' '%s'\n", $script, $output_file; + if (!-x $script) { + die "The configured post-processing script is not executable: check permissions. ($script)\n"; + } + system($script, $output_file); } } }