github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/kbfs/libkbfs/choosedefaultmount_windows.go (about) 1 // Copyright 2016 Keybase Inc. All rights reserved. 2 // Use of this source code is governed by a BSD 3 // license that can be found in the LICENSE file. 4 5 //go:build windows 6 // +build windows 7 8 package libkbfs 9 10 import ( 11 "github.com/keybase/client/go/logger" 12 "golang.org/x/net/context" 13 "strings" 14 ) 15 16 func chooseDefaultMount(ctx context.Context, dirs []string, log logger.Logger) (string, error) { 17 if len(dirs) == 0 { 18 log.CInfof(ctx, "chooseDefaultMount fails - nothing to choose from") 19 return "K:", nil 20 } 21 var dir string 22 for _, dir = range dirs { 23 // Try to use a drive at K or later 24 if strings.ToUpper(dir) >= "K:" { 25 break 26 } 27 } 28 return dir, nil 29 }