mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 00:20:50 +00:00
* Start working on nullable checks help me * Update GlobalConfig.cs * Finish initial fixup round * nullability code review
This commit is contained in:
committed by
GitHub
parent
e5f64ec9dd
commit
9fc1ea65a5
@@ -29,7 +29,7 @@ namespace ArchiSteamFarm.Helpers {
|
||||
public abstract class SerializableFile : IDisposable {
|
||||
private readonly SemaphoreSlim FileSemaphore = new SemaphoreSlim(1, 1);
|
||||
|
||||
protected string FilePath { private get; set; }
|
||||
protected string? FilePath { private get; set; }
|
||||
|
||||
private bool ReadOnly;
|
||||
private bool SavingScheduled;
|
||||
@@ -37,7 +37,11 @@ namespace ArchiSteamFarm.Helpers {
|
||||
public virtual void Dispose() => FileSemaphore.Dispose();
|
||||
|
||||
protected async Task Save() {
|
||||
if (ReadOnly || string.IsNullOrEmpty(FilePath)) {
|
||||
if (string.IsNullOrEmpty(FilePath)) {
|
||||
throw new ArgumentNullException(nameof(FilePath));
|
||||
}
|
||||
|
||||
if (ReadOnly) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user