Skip to content
Snippets Groups Projects
Commit 94536817 authored by Godoy, William's avatar Godoy, William
Browse files

Fixing issue #230 a bug for path in file name

Added portable PathSeparator
Fixed format for bp file name
parent 9e5112f9
No related branches found
No related tags found
1 merge request!231Fixing issue #230 a bug for path in file name
......@@ -166,6 +166,13 @@ constexpr float DefaultBufferGrowthFactor(1.05f);
* 2Gb - 100Kb (tolerance)*/
constexpr size_t DefaultMaxFileBatchSize(2147381248);
constexpr char PathSeparator =
#ifdef _WIN32
'\\';
#else
'/';
#endif
// adios alias values and types
constexpr bool DebugON = true;
constexpr bool DebugOFF = false;
......
......@@ -111,8 +111,11 @@ BP1Base::GetBPNames(const std::vector<std::string> &baseNames) const noexcept
const int rank) -> std::string {
const std::string bpBaseName = AddExtension(baseName, ".bp");
// name.bp.dir/name.bp.rank
const std::string bpName(bpBaseName + ".dir/" + bpBaseName + "." +
// path/root.bp.dir/root.bp.rank
const std::string bpRootName =
bpBaseName.substr(bpBaseName.find_last_of(PathSeparator));
const std::string bpName(bpBaseName + ".dir/" + bpRootName + "." +
std::to_string(rank));
return bpName;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment