Salome HOME
Issue #2998: Add help description for automatic creation of constraints
[modules/shaper.git] / src / XGUI / XGUI_CompressFiles.cpp
index 49682b461688375751833a7be76cdd72a9e59404..83ccb93246acbd091c623dd96f2075d31dbf00ab 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include "XGUI_CompressFiles.h"
@@ -38,14 +37,13 @@ bool XGUI_CompressFiles::compress(const QString& theFile, std::list<std::string>
     for (aIt = theFiles.cbegin(); aIt != theFiles.cend(); ++aIt) {
       QString aPathName((*aIt).c_str());
       QFile aSrcFile(aPathName);
+      QFileInfo aInfo(aSrcFile);
+      quint64 aSize = aInfo.size();
       if (aSrcFile.open(QIODevice::ReadOnly)) {
-        QFileInfo aInfo(aSrcFile);
-        quint64 aSize = aInfo.size();
         QString aName =
           aPathName.right(aPathName.length() - aPathName.lastIndexOf(QDir::separator()) - 1);
 
-        aOutStream << aName << aSize;
-        aOutStream << qCompress(aSrcFile.readAll());
+        aOutStream << aName << aSize << qCompress(aSrcFile.readAll());
         aSrcFile.close();
       }
       else {