Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion pkg/wshrpc/wshserver/wshserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,15 @@ func (ws *WshServer) FileShareCapabilityCommand(ctx context.Context, path string
}

func (ws *WshServer) FileRestoreBackupCommand(ctx context.Context, data wshrpc.CommandFileRestoreBackupData) error {
return filebackup.RestoreBackup(data.BackupFilePath, data.RestoreToFileName)
expandedBackupPath, err := wavebase.ExpandHomeDir(data.BackupFilePath)
if err != nil {
return fmt.Errorf("failed to expand backup file path: %w", err)
}
expandedRestorePath, err := wavebase.ExpandHomeDir(data.RestoreToFileName)
if err != nil {
return fmt.Errorf("failed to expand restore file path: %w", err)
}
return filebackup.RestoreBackup(expandedBackupPath, expandedRestorePath)
}

func (ws *WshServer) DeleteSubBlockCommand(ctx context.Context, data wshrpc.CommandDeleteBlockData) error {
Expand Down
Loading