Skip to content

bug: cargo sort reports "No file found at" error when there are dots in directory path. #71

@liurenjie1024

Description

@liurenjie1024

How to reproduce

  1. Download https://dist.apache.org/repos/dist/dev/iceberg/iceberg-rust-0.2.0-rc.1/apache-iceberg-rust-0.2.0-src.tar.gz
  2. Run mkdir tmp && cd tmp && tar -xzf ../apache-iceberg-rust-0.2.0-src.tar.gz && cd apache-iceberg-rust-0.2.0-src
  3. Run cargo sort -c -w

Then it reports "No file found at" error.

Investigation

I think the bug is in this line, since it considers any path which contains dots as file with extension.

If we rename dir name apache-iceberg-rust-0.2.0-src to anything without dots, it works fine.

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