mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-19 20:12:33 +00:00
Fix permissions when creating files on linux
This commit is contained in:
parent
85734278d8
commit
5b70982c04
@ -149,7 +149,7 @@ std::string NormalizePath(const std::string& path) {
|
|||||||
bool TryMakeDirectory(const std::string& absolute_path) {
|
bool TryMakeDirectory(const std::string& absolute_path) {
|
||||||
std::cerr << "!! TryMakeDirectory " << absolute_path << std::endl;
|
std::cerr << "!! TryMakeDirectory " << absolute_path << std::endl;
|
||||||
|
|
||||||
const mode_t kMode = 0660; // UNIX style permissions, user and group read/write; other cannot access
|
const mode_t kMode = 0777; // UNIX style permissions
|
||||||
if (mkdir(absolute_path.c_str(), kMode) == -1) {
|
if (mkdir(absolute_path.c_str(), kMode) == -1) {
|
||||||
// Success if the directory exists.
|
// Success if the directory exists.
|
||||||
return errno == EEXIST;
|
return errno == EEXIST;
|
||||||
|
Loading…
Reference in New Issue
Block a user