- Windows: fix MOTD file always showing a date of 1/1/1970, reported

by maxarturo ().
This commit is contained in:
Bram Matthys 2012-10-16 11:33:27 +02:00
parent 451dca4522
commit 4c30008313
2 changed files with 3 additions and 1 deletions

View file

@ -2500,3 +2500,5 @@
- Moved documentation on authentication types to one place and refer
to it from each section (oper::password, vhost::password,
link::password-receive, etc).
- Windows: fix MOTD file always showing a date of 1/1/1970, reported
by maxarturo (#4102).

View file

@ -1770,7 +1770,7 @@ time_t unreal_getfilemodtime(const char *filename)
SYSTEMTIME sTime, lTime;
ULARGE_INTEGER fullTime;
time_t result;
HANDLE hFile = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING,
HANDLE hFile = CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
return 0;