From ce8973b33a5b1422ad3f896378391cdf5e03ab23 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 13 Feb 2017 15:45:31 +0100 Subject: [PATCH] Fixed a bug in renaming a G-code at the end of a G-code export from .tmp suffix to a non .tmp file on localized Windows. --- lib/Slic3r/Print.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index e2b328474..5ccd38b41 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -421,11 +421,11 @@ sub write_gcode { if ($tempfile) { my $i; for ($i = 0; $i < 5; $i += 1) { - last if (rename $tempfile, $file); + last if (rename Slic3r::encode_path($tempfile), Slic3r::encode_path($file)); # Wait for 1/4 seconds and try to rename once again. select(undef, undef, undef, 0.25); } - Slic3r::debugf "Faild t remove the output G-code file from $tempfile to $file. Is $tempfile locked?\n" if ($i == 5); + Slic3r::debugf "Faild to remove the output G-code file from $tempfile to $file. Is $tempfile locked?\n" if ($i == 5); } }