Merge pull request #256 from syvex/hotfix/UnixFileCopyPermissions

Preserve file permissions on Unix FileImpl::copyToImpl
This commit is contained in:
Günter Obiltschnig
2013-09-13 07:40:50 -07:00

View File

@@ -341,7 +341,7 @@ void FileImpl::copyToImpl(const std::string& path) const
}
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)
{
close(sd);