all: Apply codeql fixes

This commit is contained in:
Aaron Gokaslan 2023-02-20 10:12:46 -08:00 committed by Nick Craig-Wood
parent 2dabbe83ac
commit 745c0af571
3 changed files with 3 additions and 3 deletions

View File

@ -511,7 +511,7 @@ Example: "https://contoso.sharepoint.com/sites/mysite" or "mysite"
`)
case "url_end":
siteURL := config.Result
re := regexp.MustCompile(`https://.*\.sharepoint.com/sites/(.*)`)
re := regexp.MustCompile(`https://.*\.sharepoint\.com/sites/(.*)`)
match := re.FindStringSubmatch(siteURL)
if len(match) == 2 {
return chooseDrive(ctx, name, m, srv, chooseDriveOpt{

View File

@ -214,7 +214,7 @@ func NewFs(ctx context.Context, name string, root string, config configmap.Mappe
client := fshttp.NewClient(ctx)
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})
if err != nil {

View File

@ -18,7 +18,7 @@ func (x *FileMode) String() string {
// Set a FileMode
func (x *FileMode) Set(s string) error {
i, err := strconv.ParseInt(s, 8, 64)
i, err := strconv.ParseInt(s, 8, 32)
if err != nil {
return fmt.Errorf("bad FileMode - must be octal digits: %w", err)
}