summaryrefslogtreecommitdiffstats
path: root/lib/Utils/copyfd.cpp
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-01-18 13:19:54 +0100
committerKarel Klic <kklic@redhat.com>2010-01-18 13:19:54 +0100
commit4267cbcc29781ddcac00e259dfe05f3a26fbc2ec (patch)
tree213e47138967f1e7af4ee9ff9a3f2ed861cb5815 /lib/Utils/copyfd.cpp
parentb2d1bd9e4f387c5a014d3002d741f25421c37aac (diff)
parentb41833ed61f7b579d2a46b26d261616c21a6ae32 (diff)
downloadabrt-4267cbcc29781ddcac00e259dfe05f3a26fbc2ec.tar.gz
abrt-4267cbcc29781ddcac00e259dfe05f3a26fbc2ec.tar.xz
abrt-4267cbcc29781ddcac00e259dfe05f3a26fbc2ec.zip
Merge branch 'master' of git://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Utils/copyfd.cpp')
-rw-r--r--lib/Utils/copyfd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Utils/copyfd.cpp b/lib/Utils/copyfd.cpp
index 9abe752..fdc568a 100644
--- a/lib/Utils/copyfd.cpp
+++ b/lib/Utils/copyfd.cpp
@@ -106,7 +106,7 @@ off_t copyfd_eof(int fd1, int fd2)
return full_fd_action(fd1, fd2, 0);
}
-off_t copy_file(const char *src_name, const char *dst_name)
+off_t copy_file(const char *src_name, const char *dst_name, int mode)
{
off_t r;
int src = open(src_name, O_RDONLY);
@@ -115,7 +115,7 @@ off_t copy_file(const char *src_name, const char *dst_name)
perror_msg("Can't open '%s'", src_name);
return -1;
}
- int dst = open(dst_name, O_WRONLY | O_TRUNC | O_CREAT, 0666);
+ int dst = open(dst_name, O_WRONLY | O_TRUNC | O_CREAT, mode);
if (dst < 0)
{
close(src);