mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-22 08:04:23 +08:00
O_DIRECTORY not supported everywhere, use O_RDONLY.
This commit is contained in:
+2
-2
@@ -402,9 +402,9 @@ int mqtt3_db_backup(struct mosquitto_db *db, bool shutdown)
|
||||
fsync(fileno(db_fptr));
|
||||
|
||||
if(db->config->persistence_location){
|
||||
dir_fd = open(db->config->persistence_location, O_DIRECTORY);
|
||||
dir_fd = open(db->config->persistence_location, O_RDONLY);
|
||||
}else{
|
||||
dir_fd = open(".", O_DIRECTORY);
|
||||
dir_fd = open(".", O_RDONLY);
|
||||
}
|
||||
if(dir_fd > 0){
|
||||
fsync(dir_fd);
|
||||
|
||||
Reference in New Issue
Block a user