1234-chmod-not-owning.diff
| b/code/nel/src/misc/path.cpp Thu Jan 26 20:26:10 2012 +0100 | ||
|---|---|---|
| 2495 | 2495 |
} |
| 2496 | 2496 |
#else |
| 2497 | 2497 |
// if the file exists and there's no write access |
| 2498 |
if (access (filename.c_str(), F_OK) == 0) |
|
| 2498 |
if (access (filename.c_str(), F_OK) == 0 && access (filename.c_str(), W_OK) == -1)
|
|
| 2499 | 2499 |
{
|
| 2500 | 2500 |
// try to set the read/write access |
| 2501 | 2501 |
if (chmod (filename.c_str(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IWGRP|S_IXGRP|S_IROTH|S_IWOTH|S_IXOTH) == -1) |