Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PartDesign] [Hole] Fixed hole error caused by special characters in windows username #7383

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Mod/PartDesign/App/FeatureHole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@

#include <App/Application.h>
#include <App/DocumentObject.h>
#include <Base/FileInfo.h>
#include <Base/Placement.h>
#include <Base/Reader.h>
#include <Base/Stream.h>
#include <Base/Tools.h>
#include <Mod/Part/App/FaceMakerCheese.h>

Expand Down Expand Up @@ -2295,7 +2297,8 @@ void Hole::readCutDefinitions()
for (const auto& f : files) {
if (f.extension() == "json") {
try {
std::ifstream input(f.filePath());
Base::FileInfo fi(f.filePath());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f already is a FileInfo object. So, no need to create a tmp. object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, 74f7154 is this correct now?

Base::ifstream input(fi);
nlohmann::json j;
input >> j;
CutDimensionSet screwtype = j.get<CutDimensionSet>();
Expand Down