diff options
| author | gingerBill <bill@gingerbill.org> | 2020-12-14 14:36:45 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-12-14 14:36:45 +0000 |
| commit | f6e2d74d10d4f8ade814a0ed36bed4d98eae768c (patch) | |
| tree | 28da2de41466b229de9a6faf3eea12ce74b3c308 /core/path | |
| parent | aa2562fe7c4f787f3210f6822f08e8887710ea4f (diff) | |
Keep -vet happy
Diffstat (limited to 'core/path')
| -rw-r--r-- | core/path/filepath/match.odin | 8 | ||||
| -rw-r--r-- | core/path/filepath/path.odin | 3 | ||||
| -rw-r--r-- | core/path/filepath/path_windows.odin | 7 |
3 files changed, 9 insertions, 9 deletions
diff --git a/core/path/filepath/match.odin b/core/path/filepath/match.odin index 75508c449..57307934e 100644 --- a/core/path/filepath/match.odin +++ b/core/path/filepath/match.odin @@ -272,13 +272,13 @@ _glob :: proc(dir, pattern: string, matches: ^[dynamic]string) -> (m: [dynamic]s } defer os.close(d); - fi, ferr := os.fstat(d); + file_info, ferr := os.fstat(d); if ferr != 0 { - os.file_info_delete(fi); + os.file_info_delete(file_info); return; } - if !fi.is_dir { - os.file_info_delete(fi); + if !file_info.is_dir { + os.file_info_delete(file_info); return; } diff --git a/core/path/filepath/path.odin b/core/path/filepath/path.odin index 3a11c09e8..f19a10d46 100644 --- a/core/path/filepath/path.odin +++ b/core/path/filepath/path.odin @@ -2,7 +2,6 @@ // To process paths usch as URLs that depend on forward slashes regardless of the OS, use the path package package filepath -import "core:os" import "core:strings" // is_separator checks whether the byte is a valid separator character @@ -265,7 +264,7 @@ rel :: proc(base_path, target_path: string, allocator := context.allocator) -> ( } buf := make([]byte, size); n := copy(buf, ".."); - for i in 0..<seps { + for in 0..<seps { buf[n] = SEPARATOR; copy(buf[n+1:], ".."); n += 3; diff --git a/core/path/filepath/path_windows.odin b/core/path/filepath/path_windows.odin index b538e1640..39db7de14 100644 --- a/core/path/filepath/path_windows.odin +++ b/core/path/filepath/path_windows.odin @@ -41,7 +41,8 @@ is_abs :: proc(path: string) -> bool { return false; } - path := path[l:]; + path := path; + path = path[l:]; if path == "" { return false; } @@ -123,8 +124,8 @@ split_list :: proc(path: string, allocator := context.allocator) -> []string { } assert(index == count); - for s, i in list { - s, new := strings.replace_all(s, `"`, ``, allocator); + for s0, i in list { + s, new := strings.replace_all(s0, `"`, ``, allocator); if !new { s = strings.clone(s, allocator); } |