ValveSoftware / ValveSoftware/source-sdk-2013

FindFirstEx and FindFirst on Linux cannot find anything with '*_' wildcard

Open
#1,638 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10k
Forks
3k
Avg merge
8d 11h
Merged PRs (30d)
2

Description

On Linux, there seems to be an issue related to wildcards and finding files in general.

The following code will always fail on Linux, even with GAME set:

FileFindHandle_t hTest = FILESYSTEM_INVALID_FIND_HANDLE;
const char* pszTest = filesystem->FindFirstEx( "*_dir.vpk", "MOD", &hTest );

Msg("Wildcard test: %s\n", pszTest );

However, omitting the _ in the wildcard will make it work. This is not a problem on Windows it seems. Tested on Debian 12 and 13.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Linux implementations of FindFirstEx and FindFirst, then reproduce the provided *_dir.vpk example on Debian with GAME set. Compare the wildcard handling with the behavior when the underscore is omitted; done means matching files are found on Linux without breaking the existing Windows behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.