public string GetBaseDirectory() { var baseLocation = steamService.GetBaseDirectory(); var steamAppsDirectory = Path.Combine(baseLocation, "steamapps"); if (File.Exists(Path.Combine(steamAppsDirectory, "appmanifest_620980.acf"))) { return(Path.Combine(steamAppsDirectory, "common", "Beat Saber")); } var locations = steamService.GetLibraryLocations(steamAppsDirectory); foreach (var location in locations) { if (File.Exists(Path.Combine(location.Value, "steamapps", "appmanifest_620980.acf"))) { return(Path.Combine(location.Value, "steamapps", "common", "Beat Saber")); } } throw new DirectoryNotFoundException("Could not find Beat Saber directory"); }