Repository navigation
v0.19.1
Highlights
s2.Move on an osfs or memfs storage moves into a destination whose parent directory does not exist yet, as Put and Copy always could. Move("a.txt", "dir/a.txt") failed with no such file or directory when dir/ did not exist: the backend renames the file and a rename does not create parents. osfs has behaved this way since the backend was written. memfs started in v0.16.0, whose wfs bump made its rename match the operating system's, so a test suite running on memfs that moves into a new prefix has failed since then. s3, gcs and azblob were never affected, and s2-server does not call Move.
Changes
Fixed
osfsandmemfscreate the destination's parent directory, and that of its metadata sidecar, inMove(#287, #288)
Upgrading
- Submodule consumers:
go get github.com/mojatter/s2/<module>@v0.19.1 - s2-server operators running the image:
docker pull mojatter/s2-server:0.19.1(:latestpoints at it too) cmd/s2-server/v0.19.1is published separately, shortly after:go install github.com/mojatter/s2/cmd/s2-server@v0.19.1- No configuration changes and no change to data at rest.
Library users
- On
osfsandmemfs,s2.Moveinto a destination under a directory that does not exist succeeds instead of returning an error. Nothing that succeeded before changes. - A parent that cannot be created — a file standing where a directory must go — fails the
Movebefore anything is renamed, so the source is left as it was.
Storage implementers
s2test.TestStorageCopyMovenow also moves an object into a prefix that holds nothing yet and requires the source to be gone and the body to arrive. A backend withouts2.Movergoes throughCopy+Deleteand passes as before; one whoseMoverenames without creating the destination's parent fails it.
s2-server operators
- Nothing changes. The server does not move objects; the image is rebuilt on the new version.