replace function getwd -> getcwd

This commit is contained in:
6543 2019-03-22 00:48:06 +01:00
parent fac5131e82
commit f0ee3af392
1 changed files with 21 additions and 21 deletions

View File

@ -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;