mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
sed: Keep correct owner and permissions with sed -i
This commit is contained in:
parent
d94a0623d0
commit
0003381a71
Notes:
sideshowbarker
2024-07-16 21:51:02 +09:00
Author: https://github.com/fdellwing Commit: https://github.com/SerenityOS/serenity/commit/0003381a71 Pull-request: https://github.com/SerenityOS/serenity/pull/20295 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/kleinesfilmroellchen ✅
1 changed files with 2 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue