mirror of
https://github.com/idris-lang/Idris2.git
synced 2025-01-02 00:27:34 +03:00
Better default permissions for created directories
Change the support code for directory creation so that it sets all permission bits (ugo=rwx). The process's currently active umask will be subtracted from these permissions, which leads to the result that (for a standard umask of "022") directories are created with a mode of "0755". So by default, directories created with `prim__createDir` are now also group-executable and other-executable by default. Previous behaviour was to create the directories readable for group and other, but not executable (mode "744"), and thus inaccessible to anyone except the owner.
This commit is contained in:
parent
3478297557
commit
65e36fc20f
@ -19,7 +19,7 @@ int idris2_createDir(char* dir) {
|
||||
#ifdef _WIN32
|
||||
return mkdir(dir);
|
||||
#else
|
||||
return mkdir(dir, S_IRWXU | S_IRGRP | S_IROTH);
|
||||
return mkdir(dir, S_IRWXU | S_IRWXG | S_IRWXO);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user