]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/files/file_store.cpp
Задействован метод GetConfModeDir (при создании каталога для сообщений)
[stg.git] / projects / stargazer / plugins / store / files / file_store.cpp
index fe5ed230052a1b30aad4e9c40ba8f37197021add..c27019d73f218fa30feea3a921127988c5bc24b0 100644 (file)
@@ -438,15 +438,15 @@ mode_t FILES_STORE_SETTINGS::GetConfMode() const
 {
 return confMode;
 }
-/*//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
 mode_t FILES_STORE_SETTINGS::GetConfModeDir() const
 {
 mode_t mode = confMode;
-if (statMode & S_IRUSR) mode |= S_IXUSR;
-if (statMode & S_IRGRP) mode |= S_IXGRP;
-if (statMode & S_IROTH) mode |= S_IXOTH;
+if (confMode & S_IRUSR) mode |= S_IXUSR;
+if (confMode & S_IRGRP) mode |= S_IXGRP;
+if (confMode & S_IROTH) mode |= S_IXOTH;
 return mode;
-}*/
+}
 //-----------------------------------------------------------------------------
 uid_t  FILES_STORE_SETTINGS::GetConfUID() const
 {
@@ -1921,6 +1921,7 @@ while (stIter != statTree.end())
         errorStr += strerror(errno);
         errorStr += "'";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - fprintf failed. Message: '%s'\n", strerror(errno));
+        fclose(statFile);
         return -1;
         }
     #else
@@ -1936,6 +1937,7 @@ while (stIter != statTree.end())
         errorStr += strerror(errno);
         errorStr += "'";
         printfd(__FILE__, "FILES_STORE::WriteDetailStat - fprintf failed. Message: '%s'\n", strerror(errno));
+        fclose(statFile);
         return -1;
         }
     #endif
@@ -1982,7 +1984,7 @@ if (access(dn.c_str(), F_OK) != 0)
         }
     }
 
-chmod(dn.c_str(), storeSettings.GetConfMode() | S_IXUSR);
+chmod(dn.c_str(), storeSettings.GetConfModeDir());
 
 gettimeofday(&tv, NULL);