Avoid performing tilde expansion.

The expansion being performed was often incorrect, as it's possible for
the tilde character to appear as part of the path where it should not be
expanded to the user's home directory.

Properly supporting tilde expansion is complicated and requires
additional study.  Instead of supporting it only partially, we have
decided to simplify things and just drop tilde expansion for now.  See
the discussion in issue #2619, as well as issues #2325 and #2555.
This commit is contained in:
Kenneth Hsu
2017-10-21 10:08:33 -07:00
parent 9c1e55f241
commit c9aa6cf5fb
4 changed files with 6 additions and 13 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ namespace Duplicati.UnitTest
/// </summary>
protected static readonly string BASEFOLDER =
string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("UNITTEST_BASEFOLDER"))
? Library.Utility.Utility.ExpandEnvironmentVariables(Path.Combine("~", "testdata"))
? Path.Combine(Library.Utility.Utility.HOME_PATH, "testdata")
: Environment.GetEnvironmentVariable("UNITTEST_BASEFOLDER");
/// <summary>