Round 2 of nullable checks

This commit is contained in:
JustArchi
2020-08-23 20:45:24 +02:00
parent f99043db30
commit b3d476dea4
34 changed files with 187 additions and 338 deletions

View File

@@ -159,15 +159,15 @@ namespace ArchiSteamFarm.Helpers {
}
if (!Directory.Exists(directoryPath)) {
Directory.CreateDirectory(directoryPath);
Directory.CreateDirectory(directoryPath!);
if (OS.IsUnix) {
OS.UnixSetFileAccess(directoryPath, OS.EUnixPermission.Combined777);
OS.UnixSetFileAccess(directoryPath!, OS.EUnixPermission.Combined777);
} else {
DirectoryInfo directoryInfo = new DirectoryInfo(directoryPath);
DirectoryInfo directoryInfo = new DirectoryInfo(directoryPath!);
try {
DirectorySecurity directorySecurity = new DirectorySecurity(directoryPath, AccessControlSections.All);
DirectorySecurity directorySecurity = new DirectorySecurity(directoryPath!, AccessControlSections.All);
directoryInfo.SetAccessControl(directorySecurity);
} catch (PrivilegeNotHeldException e) {