diff options
author | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-08-21 07:54:06 +0000 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gcc.gnu.org> | 2019-08-21 07:54:06 +0000 |
commit | 134d3a142d18580ddad1286206a759f40dd3cc20 (patch) | |
tree | 675de7cf1c7c331db23353ebcc2888a4e327ebb5 /gcc | |
parent | 71043642d566b8b1c23af1f8dfa8783ca7234b28 (diff) | |
download | gcc-134d3a142d18580ddad1286206a759f40dd3cc20.zip gcc-134d3a142d18580ddad1286206a759f40dd3cc20.tar.gz gcc-134d3a142d18580ddad1286206a759f40dd3cc20.tar.bz2 |
re PR d/91339 (libphobos: ftbfs when the path contains '~')
PR d/91339
d/dmd: Merge upstream dmd b37a537d3
Fixes the error: cannot find source code for runtime library file
'object.d' when the path contains '~'.
Reviewed-on: https://github.com/dlang/dmd/pull/10309
From-SVN: r274771
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/d/dmd/MERGE | 2 | ||||
-rw-r--r-- | gcc/d/dmd/root/filename.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index cb7b6bf..578f3fc 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -375ed10aa7eb28755f92775ca5c5399550cd100b +b37a537d36c2ac69afa505a3110e2328c9fc0114 The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/root/filename.c b/gcc/d/dmd/root/filename.c index 6144d81..ad6b114 100644 --- a/gcc/d/dmd/root/filename.c +++ b/gcc/d/dmd/root/filename.c @@ -110,7 +110,8 @@ Strings *FileName::splitPath(const char *path) case '~': { char *home = getenv("HOME"); - if (home) + // Expand ~ only if it is prefixing the rest of the path. + if (!buf.offset && p[1] == '/' && home) buf.writestring(home); else buf.writestring("~"); |