Skip to content

Use sha has instead of file size to check for changes #1

@chriswheeler

Description

@chriswheeler

If i'm reading the code correctly, you are currently using the size of the file to check if it has changed.

However, some changes such as a single character will result in the file being the same size, but changed. I'd therefore suggest using sha($file) instead of size($file) to check if it's content has changed.

Also, you probably don't need to write the size/sha has to disk, just store it in a variable and of course don't reboot on the first check.

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