D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22948 - std.stdio.File doesnt open ~ files
Summary: std.stdio.File doesnt open ~ files
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-27 22:24 UTC by crazymonkyyy
Modified: 2022-07-08 15:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description crazymonkyyy 2022-03-27 22:24:37 UTC
```d
File("~/foo")
```

expected: correctly finds the foo, in the users home folder, reacting to ~ as bash would
Comment 1 Steven Schveighoffer 2022-07-08 15:55:18 UTC
Using shell expansion is not done by default for strings.

Use https://dlang.org/phobos/std_path.html#expandTilde if you want expansion of the tilde.