Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comparing files gives confusing result #48

@rrthomas

Description

@rrthomas

If the arguments to compareSync are two files, then the result of comparison is a little odd: it seems they are treated as if they were each contained in a directory, so the files are only considered the same if their names are the same.

But compareSync applied to two directories compares their contents; it should do the same for files.

I came across this issue because I have some code that normally compares directories, but in some cases it may only compare single files, and I had to special case this and not use dir-compare for the single files.

Thanks for dir-compare! A very handy piece of code.

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