diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-09-07 21:33:37 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-09-07 21:33:37 +0100 |
| commit | 3bd762591ab36dcf45453241aa55160ad96650a0 (patch) | |
| tree | 81dc056b1a7e3796be8abc3fbff41edab68cecd0 /src/common.cpp | |
| parent | 8e3b77aba81a6bd71c7e8b23f09fc76474f401d7 (diff) | |
Fix `path_is_directory` for *nix
Diffstat (limited to 'src/common.cpp')
| -rw-r--r-- | src/common.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common.cpp b/src/common.cpp index 173ef4210..441cdda34 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -480,11 +480,11 @@ wchar_t **command_line_to_wargv(wchar_t *cmd_line, int *_argc) { #else bool path_is_directory(String path) { gbAllocator a = heap_allocator(); - String copy = copy_string(a, path); - defer (gb_free(a, copy.text)); + char *copy = cast(char *)copy_string(a, path).text; + defer (gb_free(a, copy)); struct stat s; - if (stat(copy.text, &s) == 0) { + if (stat(copy, &s) == 0) { return (s.st_mode & S_IFDIR) != 0; } return false; |