mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
20ad96f3cd
This was done by stopping the user configuring single letter remotes and making sure we don't treat single letter remotes as a remote name, but as a drive letter.
14 lines
273 B
Go
14 lines
273 B
Go
// +build windows
|
|
|
|
package fs
|
|
|
|
// isDriveLetter returns a bool indicating whether name is a valid
|
|
// Windows drive letter
|
|
func isDriveLetter(name string) bool {
|
|
if len(name) != 1 {
|
|
return false
|
|
}
|
|
c := name[0]
|
|
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|
|
}
|