diff --git a/BandagedBD/Properties/Resources.Designer.cs b/BandagedBD/Properties/Resources.Designer.cs index e968a56..064c16b 100644 --- a/BandagedBD/Properties/Resources.Designer.cs +++ b/BandagedBD/Properties/Resources.Designer.cs @@ -114,7 +114,7 @@ namespace BandagedBD.Properties { } /// - /// Looks up a localized string similar to 1.0.2. + /// Looks up a localized string similar to 1.0.3. /// internal static string Version { get { diff --git a/BandagedBD/Properties/Resources.resx b/BandagedBD/Properties/Resources.resx index 1c87c35..569df1b 100644 --- a/BandagedBD/Properties/Resources.resx +++ b/BandagedBD/Properties/Resources.resx @@ -204,7 +204,7 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - 1.0.2 + 1.0.3 diff --git a/BandagedBD/Utilities.cs b/BandagedBD/Utilities.cs index ee965af..a8fe6a3 100644 --- a/BandagedBD/Utilities.cs +++ b/BandagedBD/Utilities.cs @@ -15,18 +15,19 @@ namespace BandagedBD { public static readonly Regex _matcher = new Regex(@"[0-9]+\.[0-9]+\.[0-9]+"); public static string LADPath(string append) => $"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\\{append}"; public static string PDPath(string append) => $"{Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)}\\{Environment.UserName}\\{append}"; + public static string EXEPath(string exe) => exe == string.Empty ? exe : Path.GetFullPath(Path.Combine(exe, "..\\..")); public static string StablePath => LADPath("Discord"); public static string StablePathPD => PDPath("Discord"); - public static string StablePathEXE => GetProcess("Discord"); + public static string StablePathEXE => EXEPath(GetProcess("Discord")); public static string CanaryPath => LADPath("DiscordCanary"); public static string CanaryPathPD => PDPath("DiscordCanary"); - public static string CanaryPathEXE => GetProcess("DiscordCanary"); + public static string CanaryPathEXE => EXEPath(GetProcess("DiscordCanary")); public static string PtbPath => LADPath("DiscordPTB"); public static string PtbPathPD => PDPath("DiscordPTB"); - public static string PtbPathEXE => GetProcess("DiscordPTB"); + public static string PtbPathEXE => EXEPath(GetProcess("DiscordPTB")); public static string CurrentStablePath = Directory.Exists(StablePathEXE) ? StablePathEXE : Directory.Exists(StablePathPD) ? StablePathPD : Directory.Exists(StablePath) ? StablePath : null; public static string CurrentCanaryPath = Directory.Exists(CanaryPathEXE) ? CanaryPathEXE : Directory.Exists(CanaryPathPD) ? CanaryPathPD : Directory.Exists(CanaryPath) ? CanaryPath : null;