CRITICAL FIX: Eliminate all hardcoded /tmp paths - respect WorkDir configuration
This is a critical bugfix release addressing multiple hardcoded temporary directory paths that prevented proper use of the WorkDir configuration option. PROBLEM: Users configuring WorkDir (e.g., /u01/dba/tmp) for systems with small root filesystems still experienced failures because critical operations hardcoded /tmp instead of respecting the configured WorkDir. This made the WorkDir option essentially non-functional. FIXED LOCATIONS: 1. internal/restore/engine.go:632 - CRITICAL: Used BackupDir instead of WorkDir for extraction 2. cmd/restore.go:354,834 - CLI restore/diagnose commands ignored WorkDir 3. cmd/migrate.go:208,347 - Migration commands hardcoded /tmp 4. internal/migrate/engine.go:120 - Migration engine ignored WorkDir 5. internal/config/config.go:224 - SwapFilePath hardcoded /tmp 6. internal/config/config.go:519 - Backup directory fallback hardcoded /tmp 7. internal/tui/restore_exec.go:161 - Debug logs hardcoded /tmp 8. internal/tui/settings.go:805 - Directory browser default hardcoded /tmp 9. internal/tui/restore_preview.go:474 - Display message hardcoded /tmp NEW FEATURES: - Added Config.GetEffectiveWorkDir() helper method - WorkDir now respects WORK_DIR environment variable - All temp operations now consistently use configured WorkDir with /tmp fallback IMPACT: - Restores on systems with small root disks now work properly with WorkDir configured - Admins can control disk space usage for all temporary operations - Debug logs, extraction dirs, swap files all respect WorkDir setting Version: 3.42.1 (Critical Fix Release)
This commit is contained in:
@@ -471,7 +471,7 @@ func (m RestorePreviewModel) View() string {
|
||||
s.WriteString(debugStyle.Render(fmt.Sprintf(" %s Debug Log: %v (press 'd' to toggle)", debugIcon, m.saveDebugLog)))
|
||||
s.WriteString("\n")
|
||||
if m.saveDebugLog {
|
||||
s.WriteString(infoStyle.Render(" Saves detailed error report to /tmp on failure"))
|
||||
s.WriteString(infoStyle.Render(fmt.Sprintf(" Saves detailed error report to %s on failure", m.config.GetEffectiveWorkDir())))
|
||||
s.WriteString("\n")
|
||||
}
|
||||
s.WriteString("\n")
|
||||
|
||||
Reference in New Issue
Block a user