replace function getwd -> getcwd
This commit is contained in:
parent
fac5131e82
commit
f0ee3af392
@ -169,7 +169,7 @@ int btFiles::_btf_recurses_directory(const char *cur_path, BTFILE* lastnode)
|
||||
DIR *dp;
|
||||
BTFILE *pbf;
|
||||
|
||||
if( !getwd(full_cur) ) return -1;
|
||||
if( !getcwd(full_cur, MAXPATHLEN) ) return -1;
|
||||
|
||||
if( cur_path ){
|
||||
strcpy(fn, full_cur);
|
||||
@ -293,7 +293,7 @@ int btFiles::BuildFromFS(const char *pathname)
|
||||
m_btfhead = pbf;
|
||||
}else if( S_IFDIR & sb.st_mode ){
|
||||
char wd[MAXPATHLEN];
|
||||
if( !getwd(wd) ) return -1;
|
||||
if( !getcwd(wd, MAXPATHLEN) ) return -1;
|
||||
m_directory = new char[strlen(pathname) + 1];
|
||||
#ifndef WINDOWS
|
||||
if( !m_directory ) return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user