diff options
author | Prashanth Pai <ppai@redhat.com> | 2016-05-19 15:33:07 +0530 |
---|---|---|
committer | Thiago da Silva <thiago@redhat.com> | 2016-09-12 10:14:52 -0700 |
commit | a324c6e5cdfad77e8f91ec9869deb6b78425807e (patch) | |
tree | 22d89a29d43723d2728176bd10d9db1027507521 /gluster/swift/common/exceptions.py | |
parent | cfcfba624d554b46fe88f66949e02f5448d15e26 (diff) |
Fix validation of marker dir objects
For marker directory objects, validate_object() always returned False.
This was because st_size from stat was being compared to Content-Length
stored in metadata. Unlike files, for directories st_size is always
4096. Hence the comparison would always be '4096 == 0' which would
fail.
This patch makes the following changes:
* Do size comparison of st_size and Content-Length only for files.
* Get rid of _is_dir everywhere. This will simplify things.
Change-Id: Ib75e06c4e3bce36bab11ce7d029ff327f33c3146
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/14423
Reviewed-by: Thiago da Silva <thiago@redhat.com>
Tested-by: Thiago da Silva <thiago@redhat.com>
Diffstat (limited to 'gluster/swift/common/exceptions.py')
0 files changed, 0 insertions, 0 deletions