Salome HOME
Change permissions only if the file exists V9_11_0a1 V9_11_0a2 V9_11_0b1
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Thu, 27 Apr 2023 13:06:18 +0000 (15:06 +0200)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Thu, 27 Apr 2023 13:06:18 +0000 (15:06 +0200)
src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx

index 6e0012c8dbe38b43e797aec8be792eb8f9617e9e..fbc5bf17f57965b46d08b012b7ac03c3efb046f0 100644 (file)
@@ -119,7 +119,8 @@ static std::string flagsToErrorStr( int anInvalidEnforcedFlags )
 // change results files permissions to user only (using boost to be used without C++17)
 static void chmodUserOnly(const char* filename)
 {
-  boofs::permissions(filename, boofs::remove_perms | boofs::group_all | boofs::others_all );
+  if (boofs::exists(filename))
+    boofs::permissions(filename, boofs::remove_perms | boofs::group_all | boofs::others_all );
 }
 
 typedef const list<const SMDS_MeshFace*> TTriaList;