Repository: files-community/Files
File: src/Files.App/Constants.cs (C#)

Code before:

			public static readonly string LocalAppDataPath = Windows.Storage.UserDataPaths.GetDefault().LocalAppData;

			// Currently is the command to open the folder from cmd ("cmd /c start Shell:RecycleBinFolder")
			public const string RecycleBinPath = @"Shell:RecycleBinFolder";

			public const string NetworkFolderPath = @"Shell:NetworkPlacesFolder";

			public const string MyComputerPath = @"Shell:MyComputerFolder";

			public static readonly string TempPath = Environment.GetEnvironmentVariable("TEMP") ?? "";

			public static readonly string HomePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);

			public static readonly string SystemRootPath = Environment.GetFolderPath(Environment.SpecialFolder.Windows);

			public static readonly string RecentItemsPath = Environment.GetFolderPath(Environment.SpecialFolder.Recent);

			public static string SystemDrivePath
			{
				get
				{
					var systemDrive = Environment.GetEnvironmentVariable("SystemDrive");
					return !string.IsNullOrEmpty(systemDrive) ? systemDrive : "C:";
				}
			}

			public static Dictionary<string, string> ShellPlaces =
				new()
				{
					{ "::{645FF040-5081-101B-9F08-00AA002F954E}", RecycleBinPath },
					{ "::{5E5F29CE-E0A8-49D3-AF32-7A7BDC173478}", "Home" /*MyComputerPath*/ },
					{ "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", MyComputerPath },
					{ "::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}", NetworkFolderPath },
					{ "::{208D2C60-3AEA-1069-A2D7-08002B30309D}", NetworkFolderPath },
					{ RecycleBinPath.ToUpperInvariant(), RecycleBinPath },
					{ MyComputerPath.ToUpperInvariant(), MyComputerPath },
					{ NetworkFolderPath.ToUpperInvariant(), NetworkFolderPath },
				};
		}
	}
}


Review comment (suggestion):
```suggestion
			public static readonly string SystemDrivePath;

			static UserEnvironmentPaths()
			{
				var systemDrive = Environment.GetEnvironmentVariable("SystemDrive");
				SystemDrivePath = !string.IsNullOrEmpty(systemDrive) ? systemDrive : "C:";
			}
```
The static constructor allows it to remain a readonly field.

Code after:

			public static readonly string LocalAppDataPath = Windows.Storage.UserDataPaths.GetDefault().LocalAppData;

			// Currently is the command to open the folder from cmd ("cmd /c start Shell:RecycleBinFolder")
			public const string RecycleBinPath = @"Shell:RecycleBinFolder";

			public const string NetworkFolderPath = @"Shell:NetworkPlacesFolder";

			public const string MyComputerPath = @"Shell:MyComputerFolder";

			public static readonly string TempPath = Environment.GetEnvironmentVariable("TEMP") ?? "";

			public static readonly string HomePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);

			public static readonly string SystemRootPath = Environment.GetFolderPath(Environment.SpecialFolder.Windows);

			public static readonly string RecentItemsPath = Environment.GetFolderPath(Environment.SpecialFolder.Recent);

			public static readonly string SystemDrivePath;

			static UserEnvironmentPaths()
			{
				var systemDrive = Environment.GetEnvironmentVariable("SystemDrive");
				SystemDrivePath = !string.IsNullOrEmpty(systemDrive) ? systemDrive : "C:";
			}

			public static Dictionary<string, string> ShellPlaces =
				new()
				{
					{ "::{645FF040-5081-101B-9F08-00AA002F954E}", RecycleBinPath },
					{ "::{5E5F29CE-E0A8-49D3-AF32-7A7BDC173478}", "Home" /*MyComputerPath*/ },
					{ "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", MyComputerPath },
					{ "::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}", NetworkFolderPath },
					{ "::{208D2C60-3AEA-1069-A2D7-08002B30309D}", NetworkFolderPath },
					{ RecycleBinPath.ToUpperInvariant(), RecycleBinPath },
					{ MyComputerPath.ToUpperInvariant(), MyComputerPath },
					{ NetworkFolderPath.ToUpperInvariant(), NetworkFolderPath },
				};
		}
	}
}