Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

aniDBfileInfo.py get_file_size returns 0 #2

Description

@VonDoogles

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions