Добавлена возможность зарегистрировать локальный снапшот

This commit is contained in:
2025-10-30 01:36:21 +03:00
parent f34539c06b
commit cd98d1f4a2
5 changed files with 110 additions and 1196 deletions

View File

@@ -154,7 +154,11 @@ func (c *Client) DownloadSnapshotDiff(ctx context.Context, snapshotID, localPare
if err != nil {
return fmt.Errorf("failed to open file %s: %w", targetPath, err)
}
defer file.Close()
defer func() {
if err := file.Close(); err != nil {
fmt.Printf("failed to close file: %v", err)
}
}()
for {
resp, err := stream.Recv()