mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 17:10:28 +00:00
80da2dc722
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
18 lines
293 B
Go
18 lines
293 B
Go
package vfs
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
func isCrossDeviceError(err error) bool {
|
|
return errors.Is(err, windows.ERROR_NOT_SAME_DEVICE)
|
|
}
|
|
|
|
func isInvalidNameError(err error) bool {
|
|
if err == nil {
|
|
return false
|
|
}
|
|
return errors.Is(err, windows.ERROR_INVALID_NAME)
|
|
}
|