Initialized the mask variable.

Moved the FPERM_ defines into the .cpp and removed the header file.
This commit is contained in:
Andrew
2014-06-27 16:43:51 -04:00
parent f3299b2c8c
commit 3022b665dd
2 changed files with 11 additions and 47 deletions
+11 -2
View File
@@ -41,7 +41,16 @@
#if defined PLATFORM_WINDOWS
#include <io.h>
#include "smn_filesystem.h"
#define FPERM_U_READ 0x0100 /* User can read. */
#define FPERM_U_WRITE 0x0080 /* User can write. */
#define FPERM_U_EXEC 0x0040 /* User can exec. */
#define FPERM_G_READ 0x0020 /* Group can read. */
#define FPERM_G_WRITE 0x0010 /* Group can write. */
#define FPERM_G_EXEC 0x0008 /* Group can exec. */
#define FPERM_O_READ 0x0004 /* Anyone can read. */
#define FPERM_O_WRITE 0x0002 /* Anyone can write. */
#define FPERM_O_EXEC 0x0001 /* Anyone can exec. */
#endif
HandleType_t g_FileType;
@@ -479,7 +488,7 @@ static cell_t sm_SetFilePermissions(IPluginContext *pContext, const cell_t *para
g_pSM->BuildPath(Path_Game, realpath, sizeof(realpath), "%s", name);
#if defined PLATFORM_WINDOWS
int mask;
int mask = 0;
if (params[2] & FPERM_U_WRITE || params[2] & FPERM_G_WRITE || params[2] & FPERM_O_WRITE)
{
mask |= _S_IWRITE;