COMP: Another borland bug

This commit is contained in:
Andy Cedilnik 2005-12-30 16:05:54 -05:00
parent 6a9d13a32f
commit 2c30cb64b1
1 changed files with 10 additions and 0 deletions

View File

@ -564,6 +564,16 @@ tar_extract_dir(TAR *t, char *realname)
if (mkdir(filename, mode) == -1)
#endif
{
#ifdef __BORLANDC__
/* There is a bug in the Borland Run time library which makes MKDIR
return EACCES when it should return EEXIST
if it is some other error besides directory exists
then return false */
if ( errno == EACCES)
{
errno = EEXIST;
}
#endif
if (errno == EEXIST)
{
if (chmod(filename, mode) == -1)