1
0
mirror of https://github.com/golang/go synced 2024-11-15 11:10:22 -07:00
go/doc/next/6-stdlib/99-minor/archive
Song Gao 0081f17f14 archive/{zip,tar}: fix Writer.AddFS to include empty directories
This change modifies the `(*Writer).AddFS` implementation in both `archive/zip`
and `archive/tar` to always write a directory header. This fixes a bug where
any empty directories in the fs were omitted when a zip or tar archive was
created from `AddFS` method.

Fixes #66831

Change-Id: Id32c9c747f9f65ec7db4aeefeaffa83567215bfc
Reviewed-on: https://go-review.googlesource.com/c/go/+/578415
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-09-23 14:32:33 +00:00
..
66831.md archive/{zip,tar}: fix Writer.AddFS to include empty directories 2024-09-23 14:32:33 +00:00