rclone/backend/swift
Julian Lepinski 9f96c0d4ea
swift: fix HEADing 0-length objects when --swift-no-large-objects set
The Swift backend does not always respect the flag telling it to skip
HEADing zero-length objects. This commit fixes that for ls/lsl/lsf.

Swift returns zero length for dynamic large object files when they're
included in a files lookup, which means that determining their size
requires HEADing each file that returns a size of zero. rclone's
--swift-no-large-objects instructs rclone that no large objects are
present and accordingly rclone should not HEAD files that return zero
length.

When rclone is performing an ls / lsf / lsl type lookup, however, it
continues to HEAD any zero length objects it encounters, even with
this flag set. Accordingly, this change causes rclone to respect the
flag in these situations.

NB: It is worth noting that this will cause rclone to incorrectly
report zero length for any dynamic large objects encountered with the
--swift-no-large-objects flag set.
2023-08-03 08:38:39 +01:00
..
auth.go swift: update github.com/ncw/swift to v2.0.0 2021-02-03 20:23:37 +00:00
swift.go swift: fix HEADing 0-length objects when --swift-no-large-objects set 2023-08-03 08:38:39 +01:00
swift_internal_test.go all: fix spelling across the project 2022-08-30 11:16:26 +02:00
swift_test.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00