[hackers] [sbase] Don't complain if we use -f in ln(1) || sin
commit ac47a21b9bf6d865f1165f376fa2bcb694eb9bf4
Author: sin <sin_AT_2f30.org>
Date: Fri Feb 14 11:23:07 2014 +0000
Don't complain if we use -f in ln(1)
diff --git a/ln.c b/ln.c
index a5aa219..7dba59b 100644
--- a/ln.c
+++ b/ln.c
_AT_@ -41,13 +41,11 @@ ln(const char *s1, const char *s2)
{
int (*flink)(const char *, const char *) = sflag ? symlink : link;
+ if (fflag)
+ if (remove(s2) == -1)
+ eprintf("remove %s:", s2);
if(flink(s1, s2) == 0)
return 0;
- if(fflag && errno == EEXIST) {
- if(remove(s2) == -1)
- eprintf("remove %s:", s2);
- return flink(s1, s2);
- }
return -1;
}
Received on Fri Feb 14 2014 - 12:25:18 CET
This archive was generated by hypermail 2.3.0
: Fri Feb 14 2014 - 12:36:17 CET