mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
sed: Keep correct owner and permissions with sed -i
This commit is contained in:
parent
d94a0623d0
commit
0003381a71
1 changed files with 2 additions and 3 deletions
|
@ -690,10 +690,9 @@ public:
|
||||||
VERIFY(m_output->is_open());
|
VERIFY(m_output->is_open());
|
||||||
|
|
||||||
TRY(m_output->seek(0, SeekMode::SetPosition));
|
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(
|
return FileSystem::copy_file(
|
||||||
m_input_file_path.string(), m_output_temp_file->path(), source_stat, *m_output,
|
m_input_file_path.string(), m_output_temp_file->path(), source_stat, *m_output);
|
||||||
FileSystem::PreserveMode::Ownership | FileSystem::PreserveMode::Permissions);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue