Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e8691c59
Commit
e8691c59
authored
Apr 10, 2001
by
Gerd Moellmann
Browse files
(Fcopy_file) [WINDOWSNT]: Use CopyFile.
parent
302f0b29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
src/fileio.c
src/fileio.c
+17
-0
No files found.
src/fileio.c
View file @
e8691c59
...
...
@@ -2334,6 +2334,22 @@ A prefix arg makes KEEP-TIME non-nil.")
else
if
(
stat
(
XSTRING
(
encoded_newname
)
->
data
,
&
out_st
)
<
0
)
out_st
.
st_mode
=
0
;
#ifdef WINDOWSNT
if
(
!
CopyFile
(
XSTRING
(
encoded_file
)
->
data
,
XSTRING
(
encoded_newname
)
->
data
,
FALSE
))
report_file_error
(
"Copying file"
,
Fcons
(
file
,
Fcons
(
newname
,
Qnil
)));
else
if
(
NILP
(
keep_time
))
{
EMACS_TIME
now
;
EMACS_GET_TIME
(
now
);
if
(
set_file_times
(
XSTRING
(
encoded_newname
)
->
data
,
now
,
now
))
Fsignal
(
Qfile_date_error
,
Fcons
(
build_string
(
"Cannot set file date"
),
Fcons
(
newname
,
Qnil
)));
}
#else
/* not WINDOWSNT */
ifd
=
emacs_open
(
XSTRING
(
encoded_file
)
->
data
,
O_RDONLY
,
0
);
if
(
ifd
<
0
)
report_file_error
(
"Opening input file"
,
Fcons
(
file
,
Qnil
));
...
...
@@ -2423,6 +2439,7 @@ A prefix arg makes KEEP-TIME non-nil.")
}
emacs_close
(
ifd
);
#endif
/* WINDOWSNT */
/* Discard the unwind protects. */
specpdl_ptr
=
specpdl
+
count
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment