add tests for fuzzed results, clean up unimplemented osc warning

This commit is contained in:
Nameless
2023-10-19 16:38:52 -05:00
parent 81f7ae63b0
commit 49f1866f28
3 changed files with 63 additions and 20 deletions

View File

@@ -255,6 +255,9 @@ pub fn expandPath(alloc: Allocator, cmd: []const u8) !?[]u8 {
path_buf[path_len] = 0;
const full_path = path_buf[0..path_len :0];
// Skip if this isn't an absolute path
if (!std.fs.path.isAbsolute(full_path)) continue;
// Stat it
const f = std.fs.openFileAbsolute(full_path, .{}) catch |err| switch (err) {
error.FileNotFound => continue,