TASK.md — Cross-Drive Backup Validation Fix (v0.12.5)

This commit is contained in:
2026-02-18 08:10:37 +01:00
parent d160c6c06d
commit da576deac5
2 changed files with 135 additions and 422 deletions
+7 -2
View File
@@ -158,14 +158,19 @@ func (r *CrossDriveRunner) IsRunning(stackName string) bool {
return r.running[stackName]
}
// ValidateDestination checks that the destination path is a mount point, writable,
// ValidateDestination checks that the destination path exists, is writable,
// and has sufficient free space (at least 100MB).
// A non-mount-point destination (e.g. a folder on the system drive) is allowed
// with a logged warning — consistent with the web UI's CheckBackupDestination.
func (r *CrossDriveRunner) ValidateDestination(path string) error {
if path == "" {
return fmt.Errorf("destination path is empty")
}
if _, err := os.Stat(path); os.IsNotExist(err) {
return fmt.Errorf("destination %s does not exist", path)
}
if !system.IsMountPoint(path) {
return fmt.Errorf("destination %s is not a mount point", path)
r.logger.Printf("[WARN] Destination %s is not a separate mount point (system drive) — backup will proceed but data is not protected against drive failure", path)
}
if !system.IsWritable(path) {
return fmt.Errorf("destination %s is not writable", path)