[hackers] [sbase] Preserve permissions when copying files || sin

From: <git_AT_suckless.org>
Date: Tue, 18 Feb 2014 17:51:58 +0100

commit fe62ed0d48b8cf7e4af9b029276f38a35ae87363
Author: sin <sin_AT_2f30.org>
Date: Tue Feb 18 16:49:41 2014 +0000

    Preserve permissions when copying files

diff --git a/util/cp.c b/util/cp.c
index 840a72a..9aa637d 100644
--- a/util/cp.c
+++ b/util/cp.c
_AT_@ -66,9 +66,9 @@ cp(const char *s1, const char *s2)
                 eprintf("fopen %s:", s2);
 
         concat(f1, s1, f2, s2);
+ fchmod(fileno(f2), st.st_mode);
         fclose(f2);
         fclose(f1);
 
         return 0;
 }
-
Received on Tue Feb 18 2014 - 17:51:58 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 18 2014 - 18:00:18 CET