Commit 7f656431 authored by Volodymyr Yurchenko's avatar Volodymyr Yurchenko
Browse files

Check the file size before closing the file

TNetXNGFile requires the file to be open to be able to run any size
checks
parent 90701891
Pipeline #1808842 failed with stage
in 3 minutes and 13 seconds
......@@ -503,9 +503,6 @@ void TJAlienFile::Close(Option_t * option)
{
if (!IsOpen()) return;
// Close file
TAliceFile::Close(option);
// If READ operation we can exit
if (fOption == "READ")
return;
......@@ -514,6 +511,10 @@ void TJAlienFile::Close(Option_t * option)
TString command("commit");
Long64_t siz = GetSize();
// Close file
TAliceFile::Close(option);
if (siz <= 0) {
Error("Close", "the reported size of the written file is <= 0");
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment