diff options
author | Sverker Eriksson <[email protected]> | 2013-09-13 18:48:18 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-09-13 18:48:18 +0200 |
commit | 439d7e1b81b77e3930d81a6ea9bbadb3cff30fa4 (patch) | |
tree | 4747ad5bee962914719ebae5d70073c263c3d097 /erts/emulator/beam/utils.c | |
parent | 43b1f1755b1ca9003d88655bfebe5ca9e46cfbf6 (diff) | |
download | otp-439d7e1b81b77e3930d81a6ea9bbadb3cff30fa4.tar.gz otp-439d7e1b81b77e3930d81a6ea9bbadb3cff30fa4.tar.bz2 otp-439d7e1b81b77e3930d81a6ea9bbadb3cff30fa4.zip |
erts: Fix loading of NIF library with unicode in path
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r-- | erts/emulator/beam/utils.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index 6293286c75..43720084d1 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -4019,28 +4019,6 @@ erts_smp_ensure_later_interval_acqb(erts_interval_t *icp, Uint64 ic) #endif } -const char *erts_basename(const char* path, char* buff) { - /* This function is not compliant with bash basename. Edge cases like "//" - and "/path//" do not work properly. - */ - int i; - int len = strlen(path); - const char *basename = path; - for (i = 0; path[i] != '\0'; i++) { - if (path[i] == '/') { - if (path[i+1] == '\0') { - memcpy(buff,basename,len - (basename-path)); - buff[len - (basename-path)-1] = '\0'; - basename = buff; - break; - } else { basename = path+i;} - } - } - if (basename == path) - return path; - return basename+1; -} - /* * A millisecond timestamp without time correction where there's no hrtime * - for tracing on "long" things... |