Merge 142fa4179e16e5b549fed5beed9d4285dfccc7e5 into 205667143c807103b493e94bc0a708e10c435598

This commit is contained in:
你知道未来吗 2025-04-08 12:40:44 +01:00 committed by GitHub
commit 276f134b13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,7 @@ import (
"net/url"
"path"
"regexp"
"sort"
"strconv"
"strings"
"sync"
@ -519,6 +520,10 @@ func chooseDrive(ctx context.Context, name string, m configmap.Mapper, srv *rest
break
}
}
// my OneDrive as the first drive
sort.SliceStable(drives.Drives, func(i, j int) bool {
return drives.Drives[i].DriveID == meDrive.DriveID
})
// add the me drive if not found already
if !found {
fs.Debugf(nil, "Adding %v to drives list from /me/drive", meDrive)