1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

vfs: add flag --vfs-case-insensitive for windows/macOS mounts

rclone mount when run on Windows & macOS will now default to `--vfs-case-insensitive`.
This means that
This commit is contained in:
Ivan Andreev
2019-09-04 23:30:48 +03:00
committed by Nick Craig-Wood
parent 530ba66d35
commit 1c4e33d4ad
7 changed files with 217 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ import (
"fmt"
"os"
"path"
"runtime"
"strings"
"sync"
"sync/atomic"
@@ -51,6 +52,7 @@ var DefaultOpt = Options{
ChunkSize: 128 * fs.MebiByte,
ChunkSizeLimit: -1,
CacheMaxSize: -1,
CaseInsensitive: runtime.GOOS == "windows" || runtime.GOOS == "darwin", // default to true on Windows and Mac, false otherwise
}
// Node represents either a directory (*Dir) or a file (*File)
@@ -199,6 +201,7 @@ type Options struct {
CacheMaxAge time.Duration
CacheMaxSize fs.SizeSuffix
CachePollInterval time.Duration
CaseInsensitive bool
}
// New creates a new VFS and root directory. If opt is nil, then