D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19266 - Some source files names are no longer accepted
Summary: Some source files names are no longer accepted
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All Windows
: P1 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2018-09-26 07:18 UTC by Rainer Schuetze
Modified: 2018-10-06 16:22 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 Rainer Schuetze 2018-09-26 07:18:40 UTC
dmd can no longer read files from a network share:

dmd \\network\share\test.d
...
Error: module `test` is in file '\\network\share\test.d' which cannot be read

You can also no longer pass in file names with the extension long file prefix:

dmd \\?\c:\tmp\test.d
...
Error: module `test` is in file '\\?\c:\tmp\test.d' which cannot be read

Redirecting some output to special devices fails, too:

dmd \\?\c:\tmp\test.d -deps nul:
...
Error: invalid file name 'nul:'


Introduced in dmd 2.078 by adding prefix \\?\ to filenames unconditionally.

This can also confuse generic file tracking for dependency generation as used by msbuild.
Comment 1 Rainer Schuetze 2018-09-26 07:27:36 UTC
https://github.com/dlang/dmd/pull/8741
Comment 2 RazvanN 2018-10-01 12:27:19 UTC
Closing as it has been merged in stable
Comment 3 github-bugzilla 2018-10-06 16:22:02 UTC
Commit pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/ac9272cd42a3a2c10639217abf98b166f9b12baf
fix issue 19266 - Some source files names are no longer accepted

only add the \\?\ prefix if the filename is actually long and does not start with \\ already.