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:
parent
8d6acd2aec
commit
e2f8ea2809
1 changed files with 7 additions and 1 deletions
|
@ -419,7 +419,13 @@ sub write_gcode {
|
||||||
close $fh;
|
close $fh;
|
||||||
|
|
||||||
if ($tempfile) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue