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;
|
DIR *dp;
|
||||||
BTFILE *pbf;
|
BTFILE *pbf;
|
||||||
|
|
||||||
if( !getwd(full_cur) ) return -1;
|
if( !getcwd(full_cur, MAXPATHLEN) ) return -1;
|
||||||
|
|
||||||
if( cur_path ){
|
if( cur_path ){
|
||||||
strcpy(fn, full_cur);
|
strcpy(fn, full_cur);
|
||||||
@ -293,7 +293,7 @@ int btFiles::BuildFromFS(const char *pathname)
|
|||||||
m_btfhead = pbf;
|
m_btfhead = pbf;
|
||||||
}else if( S_IFDIR & sb.st_mode ){
|
}else if( S_IFDIR & sb.st_mode ){
|
||||||
char wd[MAXPATHLEN];
|
char wd[MAXPATHLEN];
|
||||||
if( !getwd(wd) ) return -1;
|
if( !getcwd(wd, MAXPATHLEN) ) return -1;
|
||||||
m_directory = new char[strlen(pathname) + 1];
|
m_directory = new char[strlen(pathname) + 1];
|
||||||
#ifndef WINDOWS
|
#ifndef WINDOWS
|
||||||
if( !m_directory ) return -1;
|
if( !m_directory ) return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user