diff options
| author | Eli Zaretskii | 2012-10-04 22:07:45 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-10-04 22:07:45 +0200 |
| commit | 7604f29862ce57d9941ecc4813f9d9e2a09460c4 (patch) | |
| tree | d721e9c2cc0449b79fb7ba21fdf04e3e00989a3a /src/w32.c | |
| parent | 0e2ae83d4be1b7c54546125baf9357bd423fc776 (diff) | |
| download | emacs-7604f29862ce57d9941ecc4813f9d9e2a09460c4.tar.gz emacs-7604f29862ce57d9941ecc4813f9d9e2a09460c4.zip | |
Fix test for invalid handle in w32.c's 'utime'.
src/w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
see whether CreateFile failed.
Diffstat (limited to 'src/w32.c')
| -rw-r--r-- | src/w32.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -3954,7 +3954,7 @@ utime (const char *name, struct utimbuf *times) | |||
| 3954 | /* Need write access to set times. */ | 3954 | /* Need write access to set times. */ |
| 3955 | fh = CreateFile (name, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, | 3955 | fh = CreateFile (name, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, |
| 3956 | 0, OPEN_EXISTING, 0, NULL); | 3956 | 0, OPEN_EXISTING, 0, NULL); |
| 3957 | if (fh) | 3957 | if (fh != INVALID_HANDLE_VALUE) |
| 3958 | { | 3958 | { |
| 3959 | convert_from_time_t (times->actime, &atime); | 3959 | convert_from_time_t (times->actime, &atime); |
| 3960 | convert_from_time_t (times->modtime, &mtime); | 3960 | convert_from_time_t (times->modtime, &mtime); |