File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,17 @@ using ROOT::Experimental::Internal::RFileLog;
3030
3131static void CheckExtension (std::string_view path)
3232{
33- if (ROOT::EndsWith (path, " .xml" )) {
33+ // Throw an exception for all non-ROOT extensions that are supported by TFile.
34+ // We don't want to "accidentally" support them as this would require us to keep supporting them
35+ // "forever" and that would bite us back if we at some point change the implementation to not rely on TFile anymore.
36+ if (ROOT::EndsWith (path, " .xml" ))
3437 throw ROOT::RException (R__FAIL (" ROOT::RFile doesn't support XML files." ));
35- }
3638
37- if (!ROOT::EndsWith (path, " .root" )) {
39+ if (ROOT::EndsWith (path, " .zip" ))
40+ throw ROOT::RException (R__FAIL (" ROOT::RFile doesn't support Zip files." ));
41+
42+ if (!ROOT::EndsWith (path, " .root" ))
3843 R__LOG_INFO (RFileLog ()) << " ROOT::RFile only supports ROOT files. The preferred file extension is \" .root\" " ;
39- }
4044}
4145
4246namespace {
You can’t perform that action at this time.
0 commit comments