Skip to content

Commit

Permalink
fix: Improve error message when FSEntry.mkdir asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
Geod24 committed Jan 2, 2025
1 parent 5a4fd0c commit 608bdfa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/dub/internal/io/mockfs.d
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ public class FSEntry
public FSEntry mkdir (in NativePath path) scope
{
assert(!path.absolute() || this.parent is null,
`FSEntry.mkdir needs to be called with a relative path`);
`FSEntry(%s).mkdir(%s): needs to be called with a relative path`
.format(this.path), path);
// Check if the child already exists
auto segments = path.bySegment;
auto child = this.lookup(segments.front.name);
Expand Down

0 comments on commit 608bdfa

Please sign in to comment.