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
|
||||
$datadir ||= Wx::StandardPaths::Get->GetUserDataDir;
|
||||
$datadir = Slic3r::encode_path($datadir);
|
||||
Slic3r::debugf "Data directory: %s\n", $datadir;
|
||||
my $encoded_datadir = Slic3r::encode_path($datadir);
|
||||
my $run_wizard = (-d $encoded_datadir) ? 0 : 1;
|
||||
for ($encoded_datadir, "$encoded_datadir/print", "$encoded_datadir/filament", "$encoded_datadir/printer") {
|
||||
my $run_wizard = (-d $datadir) ? 0 : 1;
|
||||
for ($datadir, "$datadir/print", "$datadir/filament", "$datadir/printer") {
|
||||
mkdir or $self->fatal_error("Slic3r was unable to create its data directory at $_ (errno: $!).")
|
||||
unless -d $_;
|
||||
}
|
||||
|
||||
# load settings
|
||||
if (-f "$encoded_datadir/slic3r.ini") {
|
||||
if (-f "$datadir/slic3r.ini") {
|
||||
my $ini = eval { Slic3r::Config->read_ini("$datadir/slic3r.ini") };
|
||||
$Settings = $ini if $ini;
|
||||
$Settings->{_}{mode} ||= 'expert';
|
||||
|
|
Loading…
Reference in a new issue