diff options
| author | Harold Brenes <harold@hbrenes.com> | 2024-03-11 18:09:41 -0400 |
|---|---|---|
| committer | Harold Brenes <harold@hbrenes.com> | 2024-03-11 18:09:41 -0400 |
| commit | b543be0d155412c2270ae9cec3f0c85d558ac07a (patch) | |
| tree | e2dd6811883a86c9f5a60593a88299706667ee66 | |
| parent | 47837b206ed5b1b50b9390b51d8bb000a0b97030 (diff) | |
Copy file names from`dirent` into `FileInfo` during `read_directory`
| -rw-r--r-- | src/path.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path.cpp b/src/path.cpp index 742bba7f8..b07f20870 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -407,7 +407,7 @@ gb_internal ReadDirectoryError read_directory(String path, Array<FileInfo> *fi) i64 size = dir_stat.st_size; FileInfo info = {}; - info.name = name; + info.name = copy_string(a, name); info.fullpath = path_to_full_path(a, filepath); info.size = size; array_add(fi, info); |