mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-20 08:53:15 +08:00
FIX:illegal plate name should include escape characters
jira: STUDIO-8511 Change-Id: I4ce2b40117b80d98d004d99757b7d74f7ad5b5ec
This commit is contained in:
parent
993e2a24c1
commit
f475893243
@ -200,13 +200,18 @@ bool Plater::has_illegal_filename_characters(const std::string& name)
|
|||||||
for (size_t i = 0; i < std::strlen(illegal_characters); i++)
|
for (size_t i = 0; i < std::strlen(illegal_characters); i++)
|
||||||
if (name.find_first_of(illegal_characters[i]) != std::string::npos)
|
if (name.find_first_of(illegal_characters[i]) != std::string::npos)
|
||||||
return true;
|
return true;
|
||||||
|
std::array<std::string, 5> escape_characters = {"<", ">", "&", """, "'"};
|
||||||
|
for (auto escape : escape_characters) {
|
||||||
|
if (boost::contains(name, escape)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plater::show_illegal_characters_warning(wxWindow* parent)
|
void Plater::show_illegal_characters_warning(wxWindow* parent)
|
||||||
{
|
{
|
||||||
show_error(parent, _L("Invalid name, the following characters are not allowed:") + " <>:/\\|?*\"");
|
show_error(parent, _L("Invalid name, the following characters are not allowed:") + " <>:/\\|?*\"" +_L("(Including its escape characters)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SlicedInfoIdx
|
enum SlicedInfoIdx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user