Skip to content

Remove the create_directory(std::error_code&) overload#200

Merged
bugdea1er merged 3 commits into
mainfrom
create-directory
Apr 19, 2025
Merged

Remove the create_directory(std::error_code&) overload#200
bugdea1er merged 3 commits into
mainfrom
create-directory

Conversation

@bugdea1er
Copy link
Copy Markdown
Owner

@bugdea1er bugdea1er commented Apr 19, 2025

And tidy up internal functions

@bugdea1er bugdea1er requested a review from Copilot April 19, 2025 15:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes the create_directory(std::error_code&) overload and simplifies internal functions for temporary directory creation.

  • Removed the redundant create_directory overload with error code reporting.
  • Refactored temporary directory creation to use a single implementation that throws on failure.
Comments suppressed due to low confidence (1)

src/create.cpp:30

  • The updated logic in validate_prefix now throws an exception when the prefix is empty, which differs from the original behavior where an empty prefix was considered valid. Please confirm if this behavior change is intentional.
if (prefix.empty() || (++prefix.begin() == prefix.end() && prefix.is_relative() && !prefix.has_root_path())) {

@bugdea1er bugdea1er marked this pull request as ready for review April 19, 2025 15:11
@bugdea1er bugdea1er merged commit 5e1d4d2 into main Apr 19, 2025
16 checks passed
@bugdea1er bugdea1er deleted the create-directory branch April 19, 2025 15:18
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.

2 participants