Skip to content

find_files_with_pattern must be implemented #6

@inetic

Description

@inetic

It's my understanding that in C the function pointer to find_files_with_pattern may be left unset. However the rust wrapper implements its default implementation here.

Problem is this: The C code uses find_files here to get the content of the directory. Then it gets here, then here, then here and finally ends up in MatchFiles.

In MatchFiles it checks whether FindFilesWithPattern is set, which it is and thus patternCheck is NOT set to TRUE.

Because of that this condition always passes on the first entry that find_files returns.

This bug can be reproduced with your memfs example:

  1. mount the fs
  2. create some number of files in it: f1.txt, f2.txt, f3.txt, f4.txt
  3. select one of the files, say f3.txt
  4. press the Del button
  5. a dialog appears asking whether you want to delete a file. This file will likely not be f3.txt (if it is, try with another file)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions