Merge pull request #7206 from ssenthilnathan3/fix/os-glob-clone

Fix os.glob not cloning pattern when no meta characters present
This commit is contained in:
gingerBill
2026-08-04 10:52:43 +02:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -746,7 +746,7 @@ glob :: proc(pattern: string, allocator := context.allocator) -> (matches: []str
if !has_meta(pattern) {
// TODO(bill): os.lstat on here to check for error
m := make([]string, 1)
m[0] = pattern
m[0] = strings.clone(pattern)
return m[:], nil
}