#1836 - Fix misleading "Not enough disk space" warnings when Books and In progress are on different drives

This commit is contained in:
rmcrackan
2026-05-25 10:25:46 -04:00
parent a3f272a48e
commit f8c5f0da68
5 changed files with 239 additions and 48 deletions

View File

@@ -188,7 +188,7 @@ public class ProcessQueueViewModel : ReactiveObject
if (toLiberate.Length > 0)
{
// May no-op when free space is unknown (common on UNC); see DiskSpaceBackupPreflight.
if (!await DiskSpaceBackupPreflight.ConfirmBulkBackupAsync(toLiberate.Length, config))
if (!await DiskSpaceBackupPreflight.ConfirmBulkBackupAsync(toLiberate.Length, config, backupQueueAlreadyRunning: Running))
return false;
Serilog.Log.Logger.Information("Begin backup of {count} library books", toLiberate.Length);
@@ -372,6 +372,10 @@ public class ProcessQueueViewModel : ReactiveObject
{
Serilog.Log.Logger.Error(ex, "An error was encountered while processing queued items");
}
finally
{
DiskSpaceBackupPreflight.ResetBulkPreflightForQueueRun();
}
string timeToStr(TimeSpan time)
=> time.TotalHours < 1 ? $"{time:mm\\:ss}"