Changeset 865

Show
Ignore:
Timestamp:
01/28/08 21:49:27
Author:
robert
Message:

From Jean-Christophe Lombardo, "Here is a slight modification to FileUtils? / FileUtils?.cpp
As far as I know, we cannot create a directory and set its permissions
at once on windows side.
Changes are relative to revision 862 and allow vpb to compile again on windows"

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/vpb/FileUtils

    r860 r865  
    4242    #define S_IROTH 0 
    4343    #define S_IWOTH 0 
     44 
     45    #define S_IRWXU _S_IREAD | _S_IWRITE 
     46    #define S_IRWXG 0 
     47    #define S_IRWXO 0 
    4448#else 
    4549    #include <unistd.h> 
  • trunk/src/vpb/FileUtils.cpp

    r864 r865  
    3939    // variable XFD_SETSIZE for precedent 
    4040    int     vpb::getdtablesize()                                  { return 256; } 
    41     int     vpb::mkdir(const char *path, int mode)               { return ::mkdir(path,mode); } 
     41    int     vpb::mkdir(const char *path, int mode)                { int status = ::mkdir(path);  
     42                                                                    if (status == 0) status = ::chmod(path, mode); 
     43                                                                    return status; 
     44                                                                  } 
    4245 
    4346#else // WIN32