Skip to content

example_18-01_from_disk readFilenames problem #85

@j32u4ukh

Description

@j32u4ukh

The code of readFilenames for windows users has two problem as below:

  1. When dealing with the situation no files found, will cause no return value problem.
...
if ((dir = FindFirstFile((directory + "/*").c_str(), &file_data)) == INVALID_HANDLE_VALUE)
        return;  // no files found
    do {
...
  1. Add full_file_name into vector of filenames, cause the program can not find files.
    ...
        filenames.push_back(full_file_name);
    } while (FindNextFile(dir, &file_data));
    ....

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