]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added the missing check comparing filesize of local file with the one stored in the...
authorrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Feb 2008 16:26:49 +0000 (16:26 +0000)
committerrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 22 Feb 2008 16:26:49 +0000 (16:26 +0000)
SHUTTLE/AliShuttle.cxx

index e7d2935b1d6d1551be2e8706b6603ac487a35c66..557dba7c68b8284a40526e8234bf9f61e1b580fc 100644 (file)
@@ -2099,6 +2099,26 @@ const char* AliShuttle::GetFile(Int_t system, const char* detector,
                        continue;
                } 
 
+                if (fileSize.Length()>0)
+                {
+                        // compare filesize of local file with the one stored in the FXS DB
+                       TString command=("stat --format=%s");
+                       Int_t sizeComp = gSystem->Exec(Form("%s %s |grep %s 2>&1 > /dev/null",
+                                               command.Data(), localFileName.Data(),fileSize.Data()));
+
+                       if ( sizeComp != 0)
+                       {
+                               Log(detector, Form("GetFileName - size of file %s does not match with local copy!",
+                                                       filePath.Data()));
+                               result = kFALSE;
+                               continue;
+                       }
+
+               } else {
+                       Log(fCurrentDetector, Form("GetFile - size of file %s not set in %s database, skipping comparison",
+                                               filePath.Data(), GetSystemName(system)));
+                }
+
                if (fileChecksum.Length()>0)
                {
                        // compare md5sum of local file with the one stored in the FXS DB