Download raw body.
got patch: keep file permissions and create missing directories
got patch: keep file permissions and create missing directories
On Wed, Mar 16, 2022 at 06:55:07PM +0100, Omar Polo wrote: > Two great omissions that got patch has is that is does not preserve file > permissions and doesn't create missing directories. > > File permissions are not preserved because it creates a temp file that is > then rename(2)d, so we loose all the info. The following patch solves > this by inspecting the permissions of the file and restoring them just > before the rename. > > The second diff handles ENOENT from rename and tries to create the > missing directory tree (got_path_mkdir creates the full directory > structure.) > > ok for both? Yes, looking good. ok stsp@
got patch: keep file permissions and create missing directories
got patch: keep file permissions and create missing directories