Remove filefix, because Linux is case insensitive
MODIFY
WalletWasabi.Gui/CommandLine/Daemon.cs
WalletWasabi.Gui/CommandLine/Daemon.cs
@@ -52,7 +52,7 @@ namespace WalletWasabi.Gui.CommandLine
}},
{ "m|mix", "Start mixing without the GUI with the specified wallet.", x => doMix = x != null},
{ "w|wallet=", "The specified wallet file.", x => {
- walletName = x?.ToLower()?.Trim();
+ walletName = x?.Trim();
}}
};
try

MODIFY
WalletWasabi/Helpers/IoHelpers.cs
WalletWasabi/Helpers/IoHelpers.cs
@@ -200,29 +200,6 @@ namespace System.IO
}
}
- /// <summary>
- /// https://stackoverflow.com/a/479198/2061103
- /// This is a pretty simple implementation that assumes that the file and directories all exist and are accessible:
- /// </summary>
- public static string GetProperDirectoryCapitalization(DirectoryInfo dirInfo)
- {
- DirectoryInfo parentDirInfo = dirInfo.Parent;
- return parentDirInfo is null
- ? dirInfo.Name
- : Path.Combine(GetProperDirectoryCapitalization(parentDirInfo), parentDirInfo.GetDirectories(dirInfo.Name)[0].Name);
- }
-
- /// <summary>
- /// https://stackoverflow.com/a/479198/2061103
- /// This is a pretty simple implementation that assumes that the file and directories all exist and are accessible:
- /// </summary>
- public static string GetProperFilePathCapitalization(string filename)
- {
- FileInfo fileInfo = new FileInfo(filename);
- DirectoryInfo dirInfo = fileInfo.Directory;
- return Path.Combine(GetProperDirectoryCapitalization(dirInfo), dirInfo.GetFiles(fileInfo.Name)[0].Name);
- }
-
// https://stackoverflow.com/a/7957634/2061103
public static bool TryGetSafestFileVersion(string path, out string safestFilePath)
{
@@ -232,27 +209,27 @@ namespace System.IO
// If foo.data and foo.data.new exist, load foo.data; foo.data.new may be broken (e.g. power off during write).
if (File.Exists(path) && File.Exists(newPath))
{
- safestFilePath = GetProperFilePathCapitalization(path);
+ safestFilePath = path;
return true;
}
// If foo.data.old and foo.data.new exist, both should be valid, but something died very shortly afterwards - you may want to load the foo.data.old version anyway.
if (File.Exists(oldPath) && File.Exists(newPath))
{
- safestFilePath = GetProperFilePathCapitalization(oldPath);
+ safestFilePath = oldPath;
return true;
}
// If foo.data and foo.data.old exist, then foo.data should be fine, but again something went wrong, or possibly the file couldn't be deleted.
if (File.Exists(oldPath) && File.Exists(path))
{
- safestFilePath = GetProperFilePathCapitalization(path);
+ safestFilePath = path;
return true;
}
if (File.Exists(path))
{
- safestFilePath = GetProperFilePathCapitalization(path);
+ safestFilePath = path;
return true;
}

MODIFY
WalletWasabi/KeyManagement/KeyManager.cs
WalletWasabi/KeyManagement/KeyManager.cs
@@ -153,16 +153,6 @@ namespace WalletWasabi.KeyManagement
throw new FileNotFoundException($"Wallet file not found at: `{filePath}`.");
}
- // Try recase if doesn't succeed, then go with the supplied casing.
- try
- {
- filePath = IoHelpers.GetProperFilePathCapitalization(filePath);
- }
- catch
- {
- // Ignored.
- }
-
string jsonString = File.ReadAllText(safestFile, Encoding.UTF8);
var km = JsonConvert.DeserializeObject<KeyManager>(jsonString);
km.SetFilePath(filePath);

Remove filefix, because Linux is case insensitive