@@ -147,9 +147,10 @@ std::string Series::basePath() const
147147Series &Series::setBasePath (std::string const &bp)
148148{
149149 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" )
151152 throw std::runtime_error (
152- " Custom basePath not allowed in openPMD <=1.1 .0" );
153+ " Custom basePath not allowed in openPMD <=2 .0" );
153154
154155 setAttribute (" basePath" , bp);
155156 return *this ;
@@ -684,7 +685,7 @@ void Series::initDefaults(IterationEncoding ie, bool initAll)
684685 }
685686 }
686687 if (!containsAttribute (" openPMD" ))
687- setOpenPMD (getStandard ());
688+ setOpenPMD (getStandardDefault ());
688689 /*
689690 * In Append mode, only init the rest of the defaults after checking that
690691 * the file does not yet exist to avoid overriding more than needed.
@@ -1274,7 +1275,8 @@ void Series::readOneIterationFileBased(std::string const &filePath)
12741275
12751276 Parameter<Operation::OPEN_PATH> pOpen;
12761277 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" )
12781280 pOpen.path = auxiliary::replace_first (basePath (), " /%T/" , " " );
12791281 else
12801282 throw error::ReadError (
@@ -1427,7 +1429,8 @@ creating new iterations.
14271429
14281430 Parameter<Operation::OPEN_PATH> pOpen;
14291431 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" )
14311434 pOpen.path = auxiliary::replace_first (basePath (), " /%T/" , " " );
14321435 else
14331436 throw error::ReadError (
0 commit comments