mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fix of
"Unicode char like for example "ł" crush app when used in profile name" https://github.com/prusa3d/Slic3r/issues/388 The Prusa3D binary builds are missing the UTF8 libraries. To avoid having to bundle them, the case sensitive regexes testing file suffixes were replaced with explicit enumeration of lower / upper case letters. While crude, it avoids triggering the UTF8 library.
This commit is contained in:
parent
32213ce679
commit
6f28818f87
13 changed files with 26 additions and 22 deletions
|
@ -9,10 +9,10 @@ sub read_from_file {
|
|||
my ($class, $input_file, $add_default_instances) = @_;
|
||||
$add_default_instances //= 1;
|
||||
|
||||
my $model = $input_file =~ /\.stl$/i ? Slic3r::Model->load_stl(Slic3r::encode_path($input_file), basename($input_file))
|
||||
: $input_file =~ /\.obj$/i ? Slic3r::Model->load_obj(Slic3r::encode_path($input_file), basename($input_file))
|
||||
: $input_file =~ /\.amf(\.xml)?$/i ? Slic3r::Model->load_amf(Slic3r::encode_path($input_file))
|
||||
: $input_file =~ /\.prusa$/i ? Slic3r::Model->load_prus(Slic3r::encode_path($input_file))
|
||||
my $model = $input_file =~ /\.[sS][tT][lL]$/ ? Slic3r::Model->load_stl(Slic3r::encode_path($input_file), basename($input_file))
|
||||
: $input_file =~ /\.[oO][bB][jJ]$/ ? Slic3r::Model->load_obj(Slic3r::encode_path($input_file), basename($input_file))
|
||||
: $input_file =~ /\.[aA][mM][fF](\.[xX][mM][lL])?$/ ? Slic3r::Model->load_amf(Slic3r::encode_path($input_file))
|
||||
: $input_file =~ /\.[pP][rR][uU][sS][aA]$/ ? Slic3r::Model->load_prus(Slic3r::encode_path($input_file))
|
||||
: die "Input file must have .stl, .obj or .amf(.xml) extension\n";
|
||||
|
||||
die "The supplied file couldn't be read because it's empty.\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue