From: Keith M. <kei...@us...> - 2010-02-06 15:42:45
|
Update of /cvsroot/mingw/mingw-get/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7105/src Modified Files: tarproc.cpp Log Message: Work around a deficiency in Microsoft's stat() implementation. Index: tarproc.cpp =================================================================== RCS file: /cvsroot/mingw/mingw-get/src/tarproc.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tarproc.cpp 2 Feb 2010 20:19:28 -0000 1.1 --- tarproc.cpp 6 Feb 2010 15:42:37 -0000 1.2 *************** *** 239,242 **** --- 239,253 ---- * hierarchy... * + * Note: Microsoft's implementation of stat() appears to choke + * on directory path names with trailing slashes; thus, before + * we invoke the directory processing routine, (which may need + * to call stat(), to check if the specified directory already + * exists), we remove any such trailing slashes. + */ + char *p = pathname + sizeof( pathname ) - 1; + while( (p > pathname) && ((*--p == '/') || (*p == '\\')) ) + *p = '\0'; + + /* We are now ready to process the directory path name entry... */ status = ProcessDirectory( pathname ); |