drweb86 / butil

BUtil creates incremental backups, incremental synchronization and imports multimedia on your PC with deduplication and FTPS, SMB/CIFS, MTP transports support for Windows and Linux.
Other
6 stars 2 forks source link

Sync message about quota limit #337

Closed drweb86 closed 1 month ago

drweb86 commented 1 month ago
    var skippedBecauseOfQuotaFiles = WriteFileTasks
        .Where(x => x.IsSkippedBecauseOfQuota)
        .SelectMany(x => x.StorageFiles)
        .ToList();
    if (skippedBecauseOfQuotaFiles.Any())
    {
        var gigabyte = 1024 * 1024 * 1024;
        Events.Message(string.Format(BUtil.Core.Localization.Resources.Task_Status_PartialDueToQuota, skippedBecauseOfQuotaFiles.Count, skippedBecauseOfQuotaFiles.Sum(x => x.FileState.Size) / gigabyte));
    }