Files smaller than --segment-size not handled correctly.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-swiftclient |
Fix Released
|
Undecided
|
Zhou Yuan |
Bug Description
bin/swift in python-swiftclient.
If you specify the segment size to be X, files smaller than X should NOT be put into the _segment container and should not be created in the main container as manifest files. Currently they do due to the following :
if options.
Two problems to my eyes - the comparison is wrong (should be greater than) and we're comparing with a string. The fix would be:
if options.
>>> bigfile = '/path/
>>> smallfile = '/etc/hosts'
>>> segment_size = '1073741824'
>>> segment_size and os.path.
True
>>> segment_size and os.path.
True
>>> segment_size and os.path.
False
>>> segment_size and os.path.
False
>>> segment_size and os.path.
True
>>> segment_size and os.path.
False
description: | updated |
Changed in python-swiftclient: | |
status: | In Progress → Fix Committed |
Changed in python-swiftclient: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/16879
Review: https:/