Skip to content

Commit

Permalink
Do not strip to dirname.
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhayen committed May 18, 2024
1 parent 7e8cd1c commit 209af5d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nuitka/build/static_src/HelpersFilesystemPaths.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
#include "nuitka/filesystem_paths.h"
#include "nuitka/safe_string_ops.h"

const char *getExecutablePathOBSD(char *epath) {
#if defined(__OpenBSD__)
const char *_getBinaryPath2(char *epath) {
int mib[4];
char **argv;
size_t len;
Expand Down Expand Up @@ -83,12 +84,15 @@ const char *getExecutablePathOBSD(char *epath) {
free(xpath);
}

#if 0
if (ok)
*strrchr(epath, '/') = '\0';
#endif

free(argv);
return ok ? epath : NULL;
}
#endif

filename_char_t *getBinaryPath(void) {
static filename_char_t binary_filename[MAXPATHLEN];
Expand All @@ -106,7 +110,7 @@ filename_char_t *getBinaryPath(void) {
abort();
}
#elif defined(__OpenBSD__)
getExecutablePathOBSD(binary_filename);
_getBinaryPath2(binary_filename);
#elif defined(__FreeBSD__)
/* Not all of FreeBSD has /proc file system, so use the appropriate
* "sysctl" instead.
Expand Down Expand Up @@ -676,7 +680,7 @@ char const *getBinaryFilenameHostEncoded(bool resolve_symlinks) {
// Resolve any symlinks we were invoked via
resolveFileSymbolicLink(binary_filename_target, binary_filename_target, buffer_size, resolve_symlinks);
#elif defined(__OpenBSD__)
getExecutablePathOBSD(binary_filename_target);
_getBinaryPath2(binary_filename_target);
resolveFileSymbolicLink(binary_filename_target, binary_filename_target, buffer_size, resolve_symlinks);
#elif defined(__FreeBSD__)
/* Not all of FreeBSD has /proc file system, so use the appropriate
Expand Down

0 comments on commit 209af5d

Please sign in to comment.