From: Christophe Bourcier Date: Thu, 27 Apr 2023 13:06:18 +0000 (+0200) Subject: Change permissions only if the file exists X-Git-Tag: V9_11_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bda7293ea4e6c189eb681fdab85ed7ec5191b344;p=plugins%2Fghs3dplugin.git Change permissions only if the file exists --- diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 6e0012c..fbc5bf1 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -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 TTriaList;