| ... | ... | @@ -2934,7 +2934,6 @@ pub const OpenSelfExeError = error{ |
| 2934 | 2934 | /// On Windows, file paths cannot contain these characters: |
| 2935 | 2935 | /// '/', '*', '?', '"', '<', '>', '|' |
| 2936 | 2936 | BadPathName, |
| 2937 | | Overflow, |
| 2938 | 2937 | Unexpected, |
| 2939 | 2938 | } || os.OpenError || SelfExePathError || os.FlockError; |
| 2940 | 2939 | |
| ... | ... | @@ -3014,15 +3013,7 @@ pub fn selfExePath(out_buffer: []u8) SelfExePathError![]u8 { |
| 3014 | 3013 | // TODO could this slice from 0 to out_len instead? |
| 3015 | 3014 | return mem.sliceTo(out_buffer, 0); |
| 3016 | 3015 | }, |
| 3017 | | .haiku => { |
| 3018 | | // The only possible issue when looking for the self image path is |
| 3019 | | // when the buffer is too short. |
| 3020 | | // TODO replace with proper constants |
| 3021 | | if (os.find_path(null, 1000, null, out_buffer.ptr, out_buffer.len) != 0) |
| 3022 | | return error.Overflow; |
| 3023 | | return mem.sliceTo(out_buffer, 0); |
| 3024 | | }, |
| 3025 | | .openbsd => { |
| 3016 | .openbsd, .haiku => { |
| 3026 | 3017 | // OpenBSD doesn't support getting the path of a running process, so try to guess it |
| 3027 | 3018 | if (os.argv.len == 0) |
| 3028 | 3019 | return error.FileNotFound; |