From 39cc80bb8a630be5dea48378aac41ec0db6b913d Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 11 Apr 2013 10:15:06 +0000
Subject: [PATCH]

---
 contrib/onelab/OnelabClients.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/contrib/onelab/OnelabClients.cpp b/contrib/onelab/OnelabClients.cpp
index d1c9564eff..b49bcd1d39 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;
   }
-- 
GitLab