mirror of
https://github.com/troglobit/libite.git
synced 2026-10-15 10:29:31 +00:00
copyfile(): Reduce dependency and simplify, already called stat()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e3dff8e5be
commit
626d5456f7
1 file changed
+1
-1
+1
-1
@@ -175,7 +175,7 @@ ssize_t copyfile(char *src, char *dst, int len, int opt)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
out = open(dst, O_WRONLY | O_CREAT | O_TRUNC, fmode(src));
|
||||
out = open(dst, O_WRONLY | O_CREAT | O_TRUNC, st.st_mode);
|
||||
if (out < 0) {
|
||||
close(in);
|
||||
saved_errno = errno;
|
||||
|
||||
Reference in new issue
Block a user