Skip to content

Replace directory labels with prefixes#171

Merged
bugdea1er merged 5 commits intomainfrom
prefix
Feb 14, 2025
Merged

Replace directory labels with prefixes#171
bugdea1er merged 5 commits intomainfrom
prefix

Conversation

@bugdea1er
Copy link
Copy Markdown
Owner

The string_view argument to the directory constructor no longer serves as a parent name to the temporary directory; instead, it is now used as a prefix to the directory name

This is done because:

  • This is closer to the mktemp documentation examples, which create tmp.XXXXXX paths rather than tmp/XXXXXX
  • If one user program created a directory with a parent label, then another user program would sometimes fail to create a directory with the same label

Also, the parent directory for temporary directories is no longer forced to be created. The C++ standard requires std::filesystem::temp_directory_path() to return an existing directory; if it is deleted after getting the path and before creating our directory, we choose to fail as soon as possible

@bugdea1er bugdea1er merged commit e877773 into main Feb 14, 2025
15 checks passed
@bugdea1er bugdea1er deleted the prefix branch February 14, 2025 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant