We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c06318b commit 04eab98Copy full SHA for 04eab98
cmd/incus/file.go
@@ -686,10 +686,17 @@ func (c *cmdFilePull) Run(cmd *cobra.Command, args []string) error {
686
return err
687
}
688
} else {
689
- _, err = io.Copy(writer, src)
690
- if err != nil {
691
- progress.Done("")
692
- return err
+ for {
+ // Read 1MB at a time.
+ _, err = io.CopyN(writer, src, 1024 * 1024 * 1024)
+ if err != nil {
693
+ if err == io.EOF {
694
+ break
695
+ }
696
+
697
+ progress.Done("")
698
+ return err
699
700
701
702
0 commit comments