Fixed S_IWUSR problem under Windows

SVN revision: 2451
This commit is contained in:
Stefan Ritt 2012-04-25 14:52:24 +00:00
parent d3a6c3b9b1
commit 4360922e24

View File

@ -24817,7 +24817,11 @@ PMXML_NODE load_password_file(LOGBOOK * lbs, char *error, int error_size)
return NULL;
}
if ((st.st_mode & S_IWUSR) == 0) {
#ifdef OS_WINNT
if ((st.st_mode & _S_IWRITE) == 0) {
#else
if ((st.st_mode & S_IWUSR) == 0) {
#endif
sprintf(str, "Cannot access write protected password file \"%s\"", file_name);
strlcpy(error, str, error_size);
return NULL;