Mercurial > emacs
comparison src/fileio.c @ 43799:b1abfedc2e1d
(Fcopy_file): Fix last change.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sat, 09 Mar 2002 10:20:18 +0000 |
parents | 8bb81d691271 |
children | 3f86b146a02b |
comparison
equal
deleted
inserted
replaced
43798:ff7e1d919ec0 | 43799:b1abfedc2e1d |
---|---|
2415 EMACS_GET_TIME (now); | 2415 EMACS_GET_TIME (now); |
2416 filename = XSTRING (encoded_newname)->data; | 2416 filename = XSTRING (encoded_newname)->data; |
2417 | 2417 |
2418 /* Ensure file is writable while its modified time is set. */ | 2418 /* Ensure file is writable while its modified time is set. */ |
2419 attributes = GetFileAttributes (filename); | 2419 attributes = GetFileAttributes (filename); |
2420 SetFileAttributes (filename, attributes ^ FILE_ATTRIBUTE_READONLY); | 2420 SetFileAttributes (filename, attributes & ~FILE_ATTRIBUTE_READONLY); |
2421 if (set_file_times (filename, now, now)) | 2421 if (set_file_times (filename, now, now)) |
2422 { | 2422 { |
2423 /* Restore original attributes. */ | 2423 /* Restore original attributes. */ |
2424 SetFileAttributes (filename, attributes); | 2424 SetFileAttributes (filename, attributes); |
2425 Fsignal (Qfile_date_error, | 2425 Fsignal (Qfile_date_error, |