lad1337/adba — Issue #2: aniDBfileInfo.py get_file_size returns 0
Author: VonDoogles
Created: 2011-12-04 06:48:40+00:00
State: open

I ran into a case where the get_file_size function in aniDBfileInfo.py is returning a value of 0 for a file that is 280MB in size. When I changed the following code:

f = open(path)
size = len(f.read())

to:

size = os.path.getsize(path)

I now get the correct file size.

Also wouldn't "size = len(f.read())" be slow are very large files?