mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-23 10:36:37 +01:00
fixed GH #1934: File::setExecutable() on POSIX should set executable bit for group and other if corresponding readable bit is set
This commit is contained in:
parent
1f546c4502
commit
0c4cbb55ff
@ -339,6 +339,10 @@ void FileImpl::setExecutableImpl(bool flag)
|
||||
if (flag)
|
||||
{
|
||||
mode = st.st_mode | S_IXUSR;
|
||||
if (st.st_mode & S_IRGRP)
|
||||
mode |= S_IXGRP;
|
||||
if (st.st_mode & S_IROTH)
|
||||
mode |= S_IXOTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -425,7 +429,7 @@ void FileImpl::removeImpl()
|
||||
bool FileImpl::createFileImpl()
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
|
||||
int n = open(_path.c_str(), O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||
if (n != -1)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user