mirror of
https://github.com/rclone/rclone.git
synced 2024-11-30 04:15:26 +01:00
a492c0fb0e
Before this change rclone didn't use sparse files on Windows. This means that when you downloaded a file with multithread download it wrote the entire file with zeros first on the first write not at the start of the file. This change makes the file be sparse on Windows. Linux/macOS files were already sparse.
16 lines
264 B
Go
16 lines
264 B
Go
//+build !windows,!linux
|
|
|
|
package local
|
|
|
|
import "os"
|
|
|
|
// preAllocate the file for performance reasons
|
|
func preAllocate(size int64, out *os.File) error {
|
|
return nil
|
|
}
|
|
|
|
// setSparse makes the file be a sparse file
|
|
func setSparse(out *os.File) error {
|
|
return nil
|
|
}
|