summaryrefslogtreecommitdiffstats
path: root/Utilities/cmtar
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-30 21:05:54 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-30 21:05:54 (GMT)
commit2c30cb64b1d6859f99eb64810600596121b159d2 (patch)
treee1d7d2077f01fe59cf778c2991e9feb47459ef8a /Utilities/cmtar
parent6a9d13a32fcee3cfe6803cdcb4660ef0dd302c70 (diff)
downloadCMake-2c30cb64b1d6859f99eb64810600596121b159d2.zip
CMake-2c30cb64b1d6859f99eb64810600596121b159d2.tar.gz
CMake-2c30cb64b1d6859f99eb64810600596121b159d2.tar.bz2
COMP: Another borland bug
Diffstat (limited to 'Utilities/cmtar')
-rw-r--r--Utilities/cmtar/extract.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Utilities/cmtar/extract.c b/Utilities/cmtar/extract.c
index e039e56..2914b47 100644
--- a/Utilities/cmtar/extract.c
+++ b/Utilities/cmtar/extract.c
@@ -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)