@@ -147,9 +147,10 @@ std::string Series::basePath() const
147
147
Series &Series::setBasePath (std::string const &bp)
148
148
{
149
149
std::string version = openPMD ();
150
- if (version == " 1.0.0" || version == " 1.0.1" || version == " 1.1.0" )
150
+ if (version == " 1.0.0" || version == " 1.0.1" || version == " 1.1.0" ||
151
+ version == " 2.0.0" )
151
152
throw std::runtime_error (
152
- " Custom basePath not allowed in openPMD <=1.1 .0" );
153
+ " Custom basePath not allowed in openPMD <=2 .0" );
153
154
154
155
setAttribute (" basePath" , bp);
155
156
return *this ;
@@ -684,7 +685,7 @@ void Series::initDefaults(IterationEncoding ie, bool initAll)
684
685
}
685
686
}
686
687
if (!containsAttribute (" openPMD" ))
687
- setOpenPMD (getStandard ());
688
+ setOpenPMD (getStandardDefault ());
688
689
/*
689
690
* In Append mode, only init the rest of the defaults after checking that
690
691
* the file does not yet exist to avoid overriding more than needed.
@@ -1274,7 +1275,8 @@ void Series::readOneIterationFileBased(std::string const &filePath)
1274
1275
1275
1276
Parameter<Operation::OPEN_PATH> pOpen;
1276
1277
std::string version = openPMD ();
1277
- if (version == " 1.0.0" || version == " 1.0.1" || version == " 1.1.0" )
1278
+ if (version == " 1.0.0" || version == " 1.0.1" || version == " 1.1.0" ||
1279
+ version == " 2.0.0" )
1278
1280
pOpen.path = auxiliary::replace_first (basePath (), " /%T/" , " " );
1279
1281
else
1280
1282
throw error::ReadError (
@@ -1427,7 +1429,8 @@ creating new iterations.
1427
1429
1428
1430
Parameter<Operation::OPEN_PATH> pOpen;
1429
1431
std::string version = openPMD ();
1430
- if (version == " 1.0.0" || version == " 1.0.1" || version == " 1.1.0" )
1432
+ if (version == " 1.0.0" || version == " 1.0.1" || version == " 1.1.0" ||
1433
+ version == " 2.0.0" )
1431
1434
pOpen.path = auxiliary::replace_first (basePath (), " /%T/" , " " );
1432
1435
else
1433
1436
throw error::ReadError (
0 commit comments