Skip to content

Replaced the piece of source code for finding path with an existing function - #95

Merged
wenqing merged 3 commits into
ufz:masterfrom
wenqing:minor_change
Jun 5, 2018
Merged

wenqing merged 3 commits into
ufz:masterfrom
wenqing:minor_change

Conversation

@wenqing

@wenqing wenqing commented May 31, 2018

Copy link
Copy Markdown
Member

as titled.

@norihiro-w

Copy link
Copy Markdown
Contributor

looks good

@wenqing

wenqing commented Jun 1, 2018 •

Copy link
Copy Markdown
Member Author

@norihiro-w The path by pathDirname(FileName) misses the last path separator. and the existing function pathJoin() adds the separator. The last commit uses pathJoin for every FilePath+[file name] for a correct file name with path. Added a path separator after FilePath in the last commit.

Comment thread FEM/rf_ic_new.cpp
funfname = funfname + "/" + rfr_file_name;
}
restart_file_name = funfname;
std::string restart_file_name = FilePath + rfr_file_name;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not use pathJoin() in FileTools.h?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I had a commit to replace FilePath + name with pathJoin but I removed it soon. With that replacement, "#include "FileTools"" were added in several files and many places were changed. Later on I thought that using FilePath + name is more straightforward than calling pathJoin.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i see

@wenqing
wenqing merged commit 4b8eacf into ufz:master Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants