OS: Add FreeBSD support inside ASF code

#2129
This commit is contained in:
Archi
2021-06-21 11:47:20 +02:00
parent a355c1a4ba
commit d01a26e48a
3 changed files with 21 additions and 5 deletions

View File

@@ -174,7 +174,11 @@ namespace ArchiSteamFarm.Helpers {
// Non-critical, user might have no rights to manage the resource
ASF.ArchiLogger.LogGenericDebuggingException(e);
}
} else {
#if NETFRAMEWORK
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
#else
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
#endif
OS.UnixSetFileAccess(directoryPath!, OS.EUnixPermission.Combined777);
}
}
@@ -195,7 +199,11 @@ namespace ArchiSteamFarm.Helpers {
// Non-critical, user might have no rights to manage the resource
ASF.ArchiLogger.LogGenericDebuggingException(e);
}
} else {
#if NETFRAMEWORK
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
#else
} else if (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) {
#endif
OS.UnixSetFileAccess(FilePath, OS.EUnixPermission.Combined777);
}
} catch (IOException) {