mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	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.
This commit is contained in:
		
							parent
							
								
									fd54956d70
								
							
						
					
					
						commit
						ce8973b33a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -421,11 +421,11 @@ sub write_gcode {
 | 
				
			||||||
    if ($tempfile) {
 | 
					    if ($tempfile) {
 | 
				
			||||||
        my $i;
 | 
					        my $i;
 | 
				
			||||||
        for ($i = 0; $i < 5; $i += 1)  {
 | 
					        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.
 | 
					            # Wait for 1/4 seconds and try to rename once again.
 | 
				
			||||||
            select(undef, undef, undef, 0.25);
 | 
					            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);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue