add missing implementation of os.getexepath for mac
parent
441281dd4f
commit
6c2e313155
|
@ -520,8 +520,11 @@ pub fn getexepath() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
$if mac {
|
$if mac {
|
||||||
//panic('getexepath() not impl')
|
mut bufsize := MAX_PATH // if buffer is too small this will be updated with size needed
|
||||||
return ''
|
if C._NSGetExecutablePath(result, &bufsize) == -1 {
|
||||||
|
panic('Could not get executable path, buffer too small (need: $bufsize).')
|
||||||
|
}
|
||||||
|
return tos(result, strlen(result))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue