Skip to content

Commit

Permalink
Merge pull request #13141 from simondeziel/file-mode-from-incus
Browse files Browse the repository at this point in the history
lxc/file: Get owner mode only if `--gid` or `--uid` is unset - from Incus
  • Loading branch information
tomponline authored Mar 18, 2024
2 parents 4ff6965 + 1b2a3cd commit f7cea51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lxc/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,9 @@ func (c *cmdFilePush) Run(cmd *cobra.Command, args []string) error {
return err
}

_, dUID, dGID := shared.GetOwnerMode(finfo)
if c.file.flagUID == -1 || c.file.flagGID == -1 {
_, dUID, dGID := shared.GetOwnerMode(finfo)

if c.file.flagUID == -1 {
uid = dUID
}
Expand Down

0 comments on commit f7cea51

Please sign in to comment.