forked from TrueCloudLab/rclone
all: Apply codeql fixes
This commit is contained in:
parent
2dabbe83ac
commit
745c0af571
3 changed files with 3 additions and 3 deletions
|
@ -511,7 +511,7 @@ Example: "https://contoso.sharepoint.com/sites/mysite" or "mysite"
|
||||||
`)
|
`)
|
||||||
case "url_end":
|
case "url_end":
|
||||||
siteURL := config.Result
|
siteURL := config.Result
|
||||||
re := regexp.MustCompile(`https://.*\.sharepoint.com/sites/(.*)`)
|
re := regexp.MustCompile(`https://.*\.sharepoint\.com/sites/(.*)`)
|
||||||
match := re.FindStringSubmatch(siteURL)
|
match := re.FindStringSubmatch(siteURL)
|
||||||
if len(match) == 2 {
|
if len(match) == 2 {
|
||||||
return chooseDrive(ctx, name, m, srv, chooseDriveOpt{
|
return chooseDrive(ctx, name, m, srv, chooseDriveOpt{
|
||||||
|
|
|
@ -214,7 +214,7 @@ func NewFs(ctx context.Context, name string, root string, config configmap.Mappe
|
||||||
|
|
||||||
client := fshttp.NewClient(ctx)
|
client := fshttp.NewClient(ctx)
|
||||||
f.srv = rest.NewClient(client).SetRoot(apiBaseURL)
|
f.srv = rest.NewClient(client).SetRoot(apiBaseURL)
|
||||||
f.IDRegexp = regexp.MustCompile("https://uptobox.com/([a-zA-Z0-9]+)")
|
f.IDRegexp = regexp.MustCompile(`https://uptobox\.com/([a-zA-Z0-9]+)`)
|
||||||
|
|
||||||
_, err = f.readMetaDataForPath(ctx, f.dirPath(""), &api.MetadataRequestOptions{Limit: 10})
|
_, err = f.readMetaDataForPath(ctx, f.dirPath(""), &api.MetadataRequestOptions{Limit: 10})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -18,7 +18,7 @@ func (x *FileMode) String() string {
|
||||||
|
|
||||||
// Set a FileMode
|
// Set a FileMode
|
||||||
func (x *FileMode) Set(s string) error {
|
func (x *FileMode) Set(s string) error {
|
||||||
i, err := strconv.ParseInt(s, 8, 64)
|
i, err := strconv.ParseInt(s, 8, 32)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("bad FileMode - must be octal digits: %w", err)
|
return fmt.Errorf("bad FileMode - must be octal digits: %w", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue