Merge pull request #4443 from mitchellh/preservedockermode

communicator/docker: preserve file mode.
pull/4464/head
Matthew Hooker 9 years ago committed by GitHub
commit 485fa58b43

@ -70,11 +70,15 @@ func (c *Communicator) Upload(dst string, src io.Reader, fi *os.FileInfo) error
// Copy the contents to the temporary file
_, err = io.Copy(tempfile, src)
tempfile.Close()
if err != nil {
return err
}
if fi != nil {
tempfile.Chmod((*fi).Mode())
}
tempfile.Close()
// Copy the file into place by copying the temporary file we put
// into the shared folder into the proper location in the container
cmd := &packer.RemoteCmd{

Loading…
Cancel
Save