aboutsummaryrefslogtreecommitdiffstats
path: root/python2
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-07-24 13:46:15 +0200
committerMattias Andrée <maandree@operamail.com>2013-07-24 13:46:15 +0200
commit920b9d89753e2a9657139624065e2ef7e2438781 (patch)
treebd20a6c97e4f99a1a439cff5280549084e4ebfbb /python2
parentderpy bug fix (diff)
downloadsha3sum-920b9d89753e2a9657139624065e2ef7e2438781.tar.gz
sha3sum-920b9d89753e2a9657139624065e2ef7e2438781.tar.bz2
sha3sum-920b9d89753e2a9657139624065e2ef7e2438781.tar.xz
in case st_blksize is not properly set
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'python2')
-rwxr-xr-xpython2/sha3sum.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python2/sha3sum.py b/python2/sha3sum.py
index e4614d9..f1a1a11 100755
--- a/python2/sha3sum.py
+++ b/python2/sha3sum.py
@@ -913,6 +913,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
blksize = 4096
try:
blksize = os.stat(os.path.realpath(fn)).st_blksize
+ if blksize <= 0:
+ blksize = 4096
except:
pass
while True: