mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-22 00:33:44 +08:00
fix params permissions for offroad (#2356)
* fix params permissions * don't need that one old-commit-hash: 20a6ca83c9194025bb6f2edf2c3992b7b6c9001a
This commit is contained in:
@@ -167,6 +167,12 @@ int Params::write_db_value(const char* key, const char* value, size_t value_size
|
|||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Ensure permissions are correct in case we didn't create the symlink
|
||||||
|
result = chmod(path.c_str(), 0777);
|
||||||
|
if (result < 0) {
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write value to temp.
|
// Write value to temp.
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
#define ERR_NO_VALUE -33
|
#define ERR_NO_VALUE -33
|
||||||
|
|
||||||
class Params {
|
class Params {
|
||||||
private:
|
private:
|
||||||
std::string params_path;
|
std::string params_path;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Params(bool persistent_param = false);
|
Params(bool persistent_param = false);
|
||||||
Params(std::string path);
|
Params(std::string path);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user