ccollect:0.6.2->0.7.0
[nslu2-linux/optware.git] / sources / ctorrent / getcwd.patch
blobdff8c152ab89b8b4eef8ab73baa63ca77797daa7
1 diff --exclude '*Po' -ur ctorrent/btfiles.cpp ctorrent.new/btfiles.cpp
2 --- ctorrent/btfiles.cpp 2004-09-09 00:10:51.000000000 +0100
3 +++ ctorrent.new/btfiles.cpp 2005-02-03 17:51:52.000000000 +0000
4 @@ -169,7 +172,7 @@
5 DIR *dp;
6 BTFILE *pbf;
8 - if( !getwd(full_cur) ) return -1;
9 + if( !getcwd(full_cur, MAXPATHLEN) ) return -1;
11 if( cur_path ){
12 strcpy(fn, full_cur);
13 @@ -293,7 +296,7 @@
14 m_btfhead = pbf;
15 }else if( S_IFDIR & sb.st_mode ){
16 char wd[MAXPATHLEN];
17 - if( !getwd(wd) ) return -1;
18 + if( !getcwd(wd, MAXPATHLEN) ) return -1;
19 m_directory = new char[strlen(pathname) + 1];
20 #ifndef WINDOWS
21 if( !m_directory ) return -1;