diff options
-rw-r--r-- | src/fcopy/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/fcopy/main.c b/src/fcopy/main.c index c64d20127..3f2d3137f 100644 --- a/src/fcopy/main.c +++ b/src/fcopy/main.c | |||
@@ -402,6 +402,16 @@ static void duplicate_link(const char *src, const char *dest, struct stat *s) { | |||
402 | gid_t gid = s->st_gid; | 402 | gid_t gid = s->st_gid; |
403 | mode_t mode = s->st_mode; | 403 | mode_t mode = s->st_mode; |
404 | 404 | ||
405 | // NixOS problem #4887: | ||
406 | // /etc/fonts is a double symlink to a directory - copy the files instead of copying the symlink | ||
407 | // they could have some other dirs handled this way, so let's do it for all files in /etc | ||
408 | if (strncmp(src, "/etc/", 5) == 0) { | ||
409 | duplicate_dir(src, dest, s); | ||
410 | free(rsrc); | ||
411 | free(rdest); | ||
412 | return; | ||
413 | } | ||
414 | |||
405 | // build destination file name | 415 | // build destination file name |
406 | char *name; | 416 | char *name; |
407 | // char *ptr = strrchr(rsrc, '/'); | 417 | // char *ptr = strrchr(rsrc, '/'); |