mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Bugfix: expert mode was crashing when home path contained non-ASCII
characters on Windows. #1478
This commit is contained in:
		
							parent
							
								
									781e09f86f
								
							
						
					
					
						commit
						8d9361280e
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -73,16 +73,16 @@ sub OnInit { | ||||||
|      |      | ||||||
|     # locate or create data directory |     # locate or create data directory | ||||||
|     $datadir ||= Wx::StandardPaths::Get->GetUserDataDir; |     $datadir ||= Wx::StandardPaths::Get->GetUserDataDir; | ||||||
|  |     $datadir = Slic3r::encode_path($datadir); | ||||||
|     Slic3r::debugf "Data directory: %s\n", $datadir; |     Slic3r::debugf "Data directory: %s\n", $datadir; | ||||||
|     my $encoded_datadir = Slic3r::encode_path($datadir); |     my $run_wizard = (-d $datadir) ? 0 : 1; | ||||||
|     my $run_wizard = (-d $encoded_datadir) ? 0 : 1; |     for ($datadir, "$datadir/print", "$datadir/filament", "$datadir/printer") { | ||||||
|     for ($encoded_datadir, "$encoded_datadir/print", "$encoded_datadir/filament", "$encoded_datadir/printer") { |  | ||||||
|         mkdir or $self->fatal_error("Slic3r was unable to create its data directory at $_ (errno: $!).") |         mkdir or $self->fatal_error("Slic3r was unable to create its data directory at $_ (errno: $!).") | ||||||
|             unless -d $_; |             unless -d $_; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     # load settings |     # load settings | ||||||
|     if (-f "$encoded_datadir/slic3r.ini") { |     if (-f "$datadir/slic3r.ini") { | ||||||
|         my $ini = eval { Slic3r::Config->read_ini("$datadir/slic3r.ini") }; |         my $ini = eval { Slic3r::Config->read_ini("$datadir/slic3r.ini") }; | ||||||
|         $Settings = $ini if $ini; |         $Settings = $ini if $ini; | ||||||
|         $Settings->{_}{mode} ||= 'expert'; |         $Settings->{_}{mode} ||= 'expert'; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci