mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-29 15:34:07 +02:00
Preserve file permissions on Unix FileImpl::copyToImpl
This commit is contained in:
parent
fd6433eb4e
commit
8f15c1cf24
@ -341,7 +341,7 @@ void FileImpl::copyToImpl(const std::string& path) const
|
|||||||
}
|
}
|
||||||
const long blockSize = st.st_blksize;
|
const long blockSize = st.st_blksize;
|
||||||
|
|
||||||
int dd = open(path.c_str(), O_CREAT | O_TRUNC | O_WRONLY, st.st_mode & S_IRWXU);
|
int dd = open(path.c_str(), O_CREAT | O_TRUNC | O_WRONLY, st.st_mode);
|
||||||
if (dd == -1)
|
if (dd == -1)
|
||||||
{
|
{
|
||||||
close(sd);
|
close(sd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user