summaryrefslogtreecommitdiffstats
path: root/Utilities/cmtar/extract.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmtar/extract.c')
-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)