mirror of
https://github.com/rclone/rclone.git
synced 2025-08-17 17:11:37 +02:00
build: fix linting issues reported by golangci-lint on windows
This commit is contained in:
@@ -4,14 +4,10 @@ package local
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/rclone/rclone/fs"
|
||||
)
|
||||
|
||||
const (
|
||||
ERROR_SHARING_VIOLATION syscall.Errno = 32
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
// Removes name, retrying on a sharing violation
|
||||
@@ -27,7 +23,7 @@ func remove(name string) (err error) {
|
||||
if !ok {
|
||||
break
|
||||
}
|
||||
if pathErr.Err != ERROR_SHARING_VIOLATION {
|
||||
if pathErr.Err != windows.ERROR_SHARING_VIOLATION {
|
||||
break
|
||||
}
|
||||
fs.Logf(name, "Remove detected sharing violation - retry %d/%d sleeping %v", i+1, maxTries, sleepTime)
|
||||
|
@@ -443,7 +443,7 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
|
||||
}
|
||||
|
||||
URL := f.url(dir)
|
||||
files, err := f.netStorageDirRequest(ctx, dir, URL)
|
||||
files, err := f.netStorageDirRequest(ctx, URL)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -932,7 +932,7 @@ func (f *Fs) netStorageStatRequest(ctx context.Context, URL string, directory bo
|
||||
}
|
||||
|
||||
// netStorageDirRequest performs a NetStorage dir request
|
||||
func (f *Fs) netStorageDirRequest(ctx context.Context, dir string, URL string) ([]File, error) {
|
||||
func (f *Fs) netStorageDirRequest(ctx context.Context, URL string) ([]File, error) {
|
||||
const actionHeader = "version=1&action=dir&format=xml&encoding=utf-8"
|
||||
statResp := &Stat{}
|
||||
if _, err := f.callBackend(ctx, URL, "GET", actionHeader, false, statResp, nil); err != nil {
|
||||
|
Reference in New Issue
Block a user