aboutsummaryrefslogtreecommitdiff
path: root/core/path/filepath
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2022-02-15 15:47:24 +0000
committerGitHub <noreply@github.com>2022-02-15 15:47:24 +0000
commitf5697dd7f2e71411957faf9fa620e62363491083 (patch)
tree931db0d1c595326524bd7a541b0fb2c6d4a7f186 /core/path/filepath
parent6223f48c3fc096b543a51aa1c993a6f1127f2a0f (diff)
parenta23ee1edc16dc447b9e342ba56b5871e0424082e (diff)
Merge branch 'master' into odin-global-constants-as-enums
Diffstat (limited to 'core/path/filepath')
-rw-r--r--core/path/filepath/match.odin3
-rw-r--r--core/path/filepath/walk.odin2
2 files changed, 2 insertions, 3 deletions
diff --git a/core/path/filepath/match.odin b/core/path/filepath/match.odin
index c045f3ece..6399f86a2 100644
--- a/core/path/filepath/match.odin
+++ b/core/path/filepath/match.odin
@@ -227,11 +227,10 @@ glob :: proc(pattern: string, allocator := context.allocator) -> (matches: []str
return m[:], .None
}
- temp_buf: [8]byte
-
dir, file := split(pattern)
volume_len := 0
when ODIN_OS == .Windows {
+ temp_buf: [8]byte
volume_len, dir = clean_glob_path_windows(dir, temp_buf[:])
} else {
dir = clean_glob_path(dir)
diff --git a/core/path/filepath/walk.odin b/core/path/filepath/walk.odin
index 29d4fd5b1..dad63cc09 100644
--- a/core/path/filepath/walk.odin
+++ b/core/path/filepath/walk.odin
@@ -71,7 +71,7 @@ _walk :: proc(info: os.File_Info, walk_proc: Walk_Proc) -> (err: os.Errno, skip_
@(private)
read_dir :: proc(dir_name: string, allocator := context.temp_allocator) -> ([]os.File_Info, os.Errno) {
- f, err := os.open(dir_name)
+ f, err := os.open(dir_name, os.O_RDONLY)
if err != 0 {
return nil, err
}