ci: fix macos build
parent
fe48380e85
commit
84aa05f8fb
|
@ -646,13 +646,13 @@ pub fn executable() string {
|
||||||
final_len := C.GetFinalPathNameByHandleW(file, unsafe { &u16(final_path) },
|
final_len := C.GetFinalPathNameByHandleW(file, unsafe { &u16(final_path) },
|
||||||
size, 0)
|
size, 0)
|
||||||
if final_len < size {
|
if final_len < size {
|
||||||
ret := unsafe { string_from_wide2(&u16(final_path), final_len) }
|
sret := unsafe { string_from_wide2(&u16(final_path), final_len) }
|
||||||
defer {
|
defer {
|
||||||
unsafe { ret.free() }
|
unsafe { sret.free() }
|
||||||
}
|
}
|
||||||
// remove '\\?\' from beginning (see link above)
|
// remove '\\?\' from beginning (see link above)
|
||||||
ret_slice := ret[4..]
|
sret_slice := sret[4..]
|
||||||
res := ret_slice.clone()
|
res := sret_slice.clone()
|
||||||
return res
|
return res
|
||||||
} else {
|
} else {
|
||||||
eprintln('os.executable() saw that the executable file path was too long')
|
eprintln('os.executable() saw that the executable file path was too long')
|
||||||
|
|
Loading…
Reference in New Issue