sftpgo-mirror/vfs/sys_windows.go
Nicola Murino e1bf46c6a5
local fs rename: if it fails with a cross device error try a copy
I don't want to add a new setting for this, at least until we get the
first complain for a slow rename :)

Fixes #440
2021-05-27 20:14:12 +02:00

16 lines
267 B
Go

package vfs
import (
"errors"
"syscall"
"golang.org/x/sys/windows"
)
func (fi FileInfo) getFileInfoSys() interface{} {
return syscall.Win32FileAttributeData{}
}
func isCrossDeviceError(err error) bool {
return errors.Is(err, windows.ERROR_NOT_SAME_DEVICE)
}