mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 13:01:21 -03:00
@@ -847,6 +847,14 @@ bool env_universal_t::sync(callback_data_list_t *callbacks)
|
|||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
|
/* Ensure we maintain ownership and permissions (#2176) */
|
||||||
|
struct stat sbuf;
|
||||||
|
if (wstat(vars_path, &sbuf) >= 0)
|
||||||
|
{
|
||||||
|
fchown(private_fd, sbuf.st_uid, sbuf.st_gid);
|
||||||
|
fchmod(private_fd, sbuf.st_mode);
|
||||||
|
}
|
||||||
|
|
||||||
/* Apply new file */
|
/* Apply new file */
|
||||||
success = this->move_new_vars_file_into_place(private_file_path, vars_path);
|
success = this->move_new_vars_file_into_place(private_file_path, vars_path);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user