sed: Keep correct owner and permissions with sed -i

This commit is contained in:
Fabian Dellwing 2023-08-01 06:28:17 +02:00 committed by Andrew Kaster
parent d94a0623d0
commit 0003381a71
Notes: sideshowbarker 2024-07-16 21:51:02 +09:00

View file

@ -690,10 +690,9 @@ public:
VERIFY(m_output->is_open());
TRY(m_output->seek(0, SeekMode::SetPosition));
auto source_stat = TRY(Core::System::stat(m_output_temp_file->path()));
auto source_stat = TRY(Core::System::stat(m_input_file_path.string()));
return FileSystem::copy_file(
m_input_file_path.string(), m_output_temp_file->path(), source_stat, *m_output,
FileSystem::PreserveMode::Ownership | FileSystem::PreserveMode::Permissions);
m_input_file_path.string(), m_output_temp_file->path(), source_stat, *m_output);
}
private: