projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stdio: Fix some C++ test errors on Solaris 8 with GCC.
[gnulib.git]
/
lib
/
unlink.c
diff --git
a/lib/unlink.c
b/lib/unlink.c
index
3e42e28
..
8d53b11
100644
(file)
--- a/
lib/unlink.c
+++ b/
lib/unlink.c
@@
-80,6
+80,16
@@
rpl_unlink (char const *name)
}
}
if (!result)
}
}
if (!result)
- result = unlink (name);
+ {
+#if UNLINK_PARENT_BUG
+ if (len >= 2 && name[len - 1] == '.' && name[len - 2] == '.'
+ && (len == 2 || ISSLASH (name[len - 3])))
+ {
+ errno = EISDIR; /* could also use EPERM */
+ return -1;
+ }
+#endif
+ result = unlink (name);
+ }
return result;
}
return result;
}