diff options
-rwxr-xr-x | python2/sha3sum.py | 2 | ||||
-rwxr-xr-x | python3/sha3sum.py | 2 |
2 files changed, 4 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: diff --git a/python3/sha3sum.py b/python3/sha3sum.py index eba5ecd..83d5af9 100755 --- a/python3/sha3sum.py +++ b/python3/sha3sum.py @@ -894,6 +894,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: |