Skip to content

Commit

Permalink
Merge pull request #76 from everythingajw/main
Browse files Browse the repository at this point in the history
Improve efficiency of `Saves.CurrentFolder` method.
  • Loading branch information
DarwinBaker authored Sep 10, 2023
2 parents 964f06a + d9aab3c commit 486461d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion AATool/Paths.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,15 @@ public static string SpeedrunDotComRecordFile(bool rsg, bool aa, string version)
public static class Saves
{
public const string AppDataShortcut = "%AppData%\\Roaming";
private static readonly string AppDataFolderPath = GetFolderPath(SpecialFolder.ApplicationData);

public static string CurrentFolder()
{
if (Config.Tracking.UseSftp)
return System.SftpWorldsFolder;

return Tracker.Source is TrackerSource.CustomSavesPath
? Config.Tracking.CustomSavesPath.Value.Replace(AppDataShortcut, GetFolderPath(SpecialFolder.ApplicationData))
? Config.Tracking.CustomSavesPath.Value.Replace(AppDataShortcut, AppDataFolderPath)
: ActiveInstance.SavesPath;
}

Expand Down

0 comments on commit 486461d

Please sign in to comment.