/[emacs]/emacs/src/fileio.c
ViewVC logotype

Diff of /emacs/src/fileio.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.440 by rms, Sun Mar 3 21:55:33 2002 UTC revision 1.441 by jasonr, Sat Mar 9 00:35:13 2002 UTC
# Line 2409  A prefix arg makes KEEP-TIME non-nil.  * Line 2409  A prefix arg makes KEEP-TIME non-nil.  *
2409    else if (NILP (keep_time))    else if (NILP (keep_time))
2410      {      {
2411        EMACS_TIME now;        EMACS_TIME now;
2412          DWORD attributes;
2413          char * filename;
2414    
2415        EMACS_GET_TIME (now);        EMACS_GET_TIME (now);
2416        if (set_file_times (XSTRING (encoded_newname)->data,        filename = XSTRING (encoded_newname)->data;
2417                            now, now))  
2418          Fsignal (Qfile_date_error,        /* Ensure file is writable while its modified time is set.  */
2419                   Fcons (build_string ("Cannot set file date"),        attributes = GetFileAttributes (filename);
2420                          Fcons (newname, Qnil)));        SetFileAttributes (filename, attributes ^ FILE_ATTRIBUTE_READONLY);
2421          if (set_file_times (filename, now, now))
2422            {
2423              /* Restore original attributes.  */
2424              SetFileAttributes (filename, attributes);
2425              Fsignal (Qfile_date_error,
2426                       Fcons (build_string ("Cannot set file date"),
2427                              Fcons (newname, Qnil)));
2428            }
2429          /* Restore original attributes.  */
2430          SetFileAttributes (filename, attributes);
2431      }      }
2432  #else /* not WINDOWSNT */  #else /* not WINDOWSNT */
2433    ifd = emacs_open (XSTRING (encoded_file)->data, O_RDONLY, 0);    ifd = emacs_open (XSTRING (encoded_file)->data, O_RDONLY, 0);

Legend:
Removed from v.1.440  
changed lines
  Added in v.1.441

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26