mirror of
https://github.com/versity/versitygw.git
synced 2026-05-13 15:31:28 +00:00
On Windows, opening a path like "file/" where "file" is a regular file
returns ERROR_DIRECTORY instead of POSIX ENOTDIR.
Go does not map ERROR_DIRECTORY to syscall.ENOTDIR, so the existing
errors.Is(err, syscall.ENOTDIR) checks in the posix backend all missed
this case, causing HTTP 500 instead of ErrNoSuchKey.
Introduce an isErrNotDir build-tag helper pair (isnotdir_other.go /
isnotdir_windows.go, following the existing parentdir_* pattern) and
replace all ENOTDIR checks in posix.go with the new helper.
Add a --windows-test-mode / --windows flag to the integration test
runner. When set:
- PresignedAuth_Put_GetObject_with_UTF8_chars: strips '*' from object
names (illegal on Windows filesystems)
- PutObject_special_chars: filters out ':', '?', '<', '>', '|', '*'
- PutObject_false_negative_object_names: skips the literal-backslash
case (treated as a path separator on Windows)
- DeleteObject_non_empty_dir_obj and CopyObject_non_existing_dir_object
are skipped entirely (rely on POSIX trailing-slash dir semantics)
Add a --skip-racey flag to the full-flow test subcommand and enable
for sidecar tests that skip the racey tests that are expected to be
flakey with sidecar setups.
Fix genRandString to use an atomic counter seeded from
time.Now().UnixNano() instead of re-seeding math/rand on every call.
On Windows the system timer resolution can be 100ns–15ms, so concurrent
goroutines received identical seeds, generated identical access keys,
and caused 409 Conflict on user creation.