fix issue 19266 - Some source files names are no longer accepted#8741
fix issue 19266 - Some source files names are no longer accepted#8741Geod24 merged 1 commit intodlang:stablefrom
Conversation
|
Thanks for your pull request, @rainers! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "stable + dmd#8741" |
|
Do you have the PR that introduced this ? |
jacob-carlborg
left a comment
There was a problem hiding this comment.
Should also have a test if possible.
src/dmd/root/filename.d
Outdated
| static immutable prefix = `\\?\`w; | ||
|
|
||
| // prefix only needed for long names and non-UNC names | ||
| bool needsPrefix = pathLength >= MAX_PATH && (wpath[0] != '\\' || wpath[1] != '\\'); |
src/dmd/root/filename.d
Outdated
|
|
||
| // prefix only needed for long names and non-UNC names | ||
| bool needsPrefix = pathLength >= MAX_PATH && (wpath[0] != '\\' || wpath[1] != '\\'); | ||
| size_t prefixlen = needsPrefix ? prefix.length : 0; |
There was a problem hiding this comment.
const- I prefer to not use abbreviations and to use camel case names
|
Not so easy as it requires either a network share or an absolute path to be passed with |
aefeee9 to
599911b
Compare
|
Added test and changed code according to comments. |
| @@ -0,0 +1,3 @@ | |||
| module test19266; | |||
|
|
|||
| pragma(msg, __FILE__); | |||
There was a problem hiding this comment.
Is this doing anything for the test?
There was a problem hiding this comment.
No, but you can look it up in the test_result folder. If \\?\ is given on the command line it is also found in __FILE__.
599911b to
e4f442e
Compare
only add the \\?\ prefix if the filename is actually long and does not start with \\ already.
e4f442e to
e354814
Compare
|
The AppVeyor failure is due to stdint and unrelated to this. #8729 will fix it. |
only add the \?\ prefix if the filename is actually long and does not start with \ already.