diff --git a/contrib/onelab/OnelabClients.cpp b/contrib/onelab/OnelabClients.cpp index d1c9564eff32914aea82381cc7f847be4424549f..b49bcd1d3920e45f294a9c3293b4efbd2ec0243a 100644 --- a/contrib/onelab/OnelabClients.cpp +++ b/contrib/onelab/OnelabClients.cpp @@ -1317,7 +1317,11 @@ bool chmod(std::string fileName){ struct stat info; stat(fileName.c_str(), &info); // chmod u=rwx - if (chmod(fileName.c_str(), 0000700) != 0){ +#if defined(WIN32) + if (_chmod(fileName.c_str(), _S_IREAD | _S_IWRITE) != 0){ +#else + if (chmod(fileName.c_str(), S_IRWXU) != 0){ +#endif perror("chmod() error"); return false; }