diff options
author | Lauri Aarnio <Lauri.Aarnio@iki.fi> | 2008-10-09 11:28:35 +0300 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2008-10-18 15:18:15 +0300 |
commit | 0de2d64763a7f827d67cad3360c84ce09a001c92 (patch) | |
tree | 5b62f559bb61c72a33507fc6094cf273412584aa /luaif | |
parent | 6da0511b9ad4ba95d358a409004ba9abb84c4424 (diff) |
Optimized use of getcwd() in luaif/paths.c - replaced getcwd() by getcwd_nomap_nolog(), this improves performance
Diffstat (limited to 'luaif')
-rw-r--r-- | luaif/paths.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/luaif/paths.c b/luaif/paths.c index 89c2d9d..14ab9e2 100644 --- a/luaif/paths.c +++ b/luaif/paths.c @@ -286,7 +286,7 @@ static char *absolute_path(const char *path) char cwd[PATH_MAX + 1]; memset(cwd, '\0', sizeof(cwd)); - if (!getcwd(cwd, sizeof(cwd))) { + if (!getcwd_nomap_nolog(cwd, sizeof(cwd))) { /* getcwd() returns NULL if the path is really long. * In this case this really won't be able to do all * path mapping steps, but sb_decolonize_path() @@ -852,7 +852,7 @@ static char *scratchbox_path_internal( /* FIXME: work_dir should be unnecessary if path is absolute? */ memset(work_dir, '\0', sizeof(work_dir)); - getcwd(work_dir, sizeof(work_dir)-1); + getcwd_nomap_nolog(work_dir, sizeof(work_dir)-1); SB_LOG(SB_LOGLEVEL_DEBUG, "scratchbox_path_internal: process '%s', n='%s'", |