When renaming the exported G-code (removing the .tmp suffix),

some other application (thank you, Windows Explorer) may keep the file locked.
Try to wait a bit and then rename the file again.
This commit is contained in:
bubnikv 2017-02-13 12:36:46 +01:00
parent 8d6acd2aec
commit e2f8ea2809

View File

@ -419,7 +419,13 @@ sub write_gcode {
close $fh;
if ($tempfile) {
rename $tempfile, $file;
my $i;
for ($i = 0; $i < 5; $i += 1) {
last if (rename $tempfile, $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);
}
}