Preserve permissions when copying files

This commit is contained in:
sin 2014-02-18 16:49:41 +00:00
parent 73066131ab
commit fe62ed0d48

View File

@ -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;
}