Skip to content

Commit 279dcdd

Browse files
committed
update comment
1 parent 7fcbfe1 commit 279dcdd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/config/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ func isAllowedDir(path string, allowedDirs []string) (bool, error) {
459459
}
460460

461461
directoryPath := path
462+
// Check if the path is a file, regex matches when end of string is /<filename>.<extension>
462463
isFilePath, err := regexp.MatchString(`/(\w+)\.(\w+)$`, directoryPath)
463464
if err != nil {
464465
return false, errors.New("error matching path" + directoryPath)

0 commit comments

Comments
 (0)