Card ingest: free-space check ignores macOS Available (purgeable) #190

Closed
opened 2026-11-06 14:01:51 +00:00 by spark · 6 comments
Owner

Problem

Card ingest refused a day (~85.6 GB) with O dia … não cabe, while System Settings showed ~97 GB Available on the destination volume.

Cause

volume_free used statvfs (f_bavail), which is the truly free blocks (~28 GB here). macOS System Settings Available uses NSURLVolumeAvailableCapacityForImportantUsageKey (~98 GB), which includes space the OS will purge for an important user copy.

Fix

On macOS, read ImportantUsage capacity (fallback to statvfs). Keep the 1 GiB headroom.

Evidence

  • Destination: /Users/cyclop/Desktop/
  • Card: /Volumes/EOS_DIGITAL — 7245 JPEG · 85.6 GB
  • df Available ≈ 28 GB; ImportantUsage ≈ 98.7 GB; System Settings 97.45 GB of 994.66 GB
## Problem Card ingest refused a day (~85.6 GB) with `O dia … não cabe`, while System Settings showed ~97 GB Available on the destination volume. ## Cause `volume_free` used `statvfs` (`f_bavail`), which is the truly free blocks (~28 GB here). macOS System Settings **Available** uses `NSURLVolumeAvailableCapacityForImportantUsageKey` (~98 GB), which includes space the OS will purge for an important user copy. ## Fix On macOS, read ImportantUsage capacity (fallback to `statvfs`). Keep the 1 GiB headroom. ## Evidence - Destination: `/Users/cyclop/Desktop/` - Card: `/Volumes/EOS_DIGITAL` — 7245 JPEG · 85.6 GB - `df` Available ≈ 28 GB; ImportantUsage ≈ 98.7 GB; System Settings 97.45 GB of 994.66 GB
Author
Owner

Causa: o ingest lia espaço livre via statvfs (só blocos já vazios, ~28 GB neste disco). O valor Available das Definições do Sistema (~97 GB) inclui espaço purgável (APFS) — NSURLVolumeAvailableCapacityForImportantUsageKey.

Com ~85.6 GB no cartão + 1 GiB de margem, a verificação antiga recusava; a nova aceita.

PR: #191

Causa: o ingest lia espaço livre via `statvfs` (só blocos já vazios, ~28 GB neste disco). O valor **Available** das Definições do Sistema (~97 GB) inclui espaço purgável (APFS) — `NSURLVolumeAvailableCapacityForImportantUsageKey`. Com ~85.6 GB no cartão + 1 GiB de margem, a verificação antiga recusava; a nova aceita. PR: https://git.bitreport.pt/BitReport.pt/photoreport/pulls/191
Author
Owner

Causa: o ingest lia espaço livre via statvfs (só blocos já vazios, ~28 GB neste disco). O valor Available das Definições do Sistema (~97 GB) inclui espaço purgável (APFS) — NSURLVolumeAvailableCapacityForImportantUsageKey.

Com ~85.6 GB no cartão + 1 GiB de margem, a verificação antiga recusava; a nova aceita.

PR: #191

Causa: o ingest lia espaço livre via `statvfs` (só blocos já vazios, ~28 GB neste disco). O valor **Available** das Definições do Sistema (~97 GB) inclui espaço purgável (APFS) — `NSURLVolumeAvailableCapacityForImportantUsageKey`. Com ~85.6 GB no cartão + 1 GiB de margem, a verificação antiga recusava; a nova aceita. PR: https://git.bitreport.pt/BitReport.pt/photoreport/pulls/191
Author
Owner

Versão 0.3.28 no PR #191. Depois do merge CI verde, tag desktop-v0.3.28 → Actions desktop-release (rebuild + release). A app actualiza-se pelo updater.

Versão **0.3.28** no PR #191. Depois do merge CI verde, tag `desktop-v0.3.28` → Actions `desktop-release` (rebuild + release). A app actualiza-se pelo updater.
spark closed this issue 2026-11-06 14:18:12 +00:00
Author
Owner

Merged #191. Release tag desktop-v0.3.28 criada — o workflow desktop-release faz o build; o updater leva a 0.3.28.

Merged #191. Release tag [`desktop-v0.3.28`](https://git.bitreport.pt/BitReport.pt/photoreport/releases/tag/desktop-v0.3.28) criada — o workflow `desktop-release` faz o build; o updater leva a 0.3.28.
Author
Owner

desktop-v0.3.28 falhou no macOS: o tsc da app puxava learning.ts → Prisma.

Corrigido em #192: CropBias em cropBias.ts. Tag desktop-v0.3.29 a construir.

`desktop-v0.3.28` falhou no macOS: o `tsc` da app puxava `learning.ts` → Prisma. Corrigido em #192: `CropBias` em `cropBias.ts`. Tag [`desktop-v0.3.29`](https://git.bitreport.pt/BitReport.pt/photoreport/releases/tag/desktop-v0.3.29) a construir.
Author
Owner

desktop-v0.3.29 construído e assets no release: https://git.bitreport.pt/BitReport.pt/photoreport/releases/tag/desktop-v0.3.29

O updater deve oferecer 0.3.29 (corrige espaço livre no ingest + o build quebrado do 0.3.28).

`desktop-v0.3.29` construído e assets no release: https://git.bitreport.pt/BitReport.pt/photoreport/releases/tag/desktop-v0.3.29 O updater deve oferecer 0.3.29 (corrige espaço livre no ingest + o build quebrado do 0.3.28).
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: BitReport.pt/photoreport#190