diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-29 14:27:23 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-29 14:27:23 -0400 |
commit | 26ccc1d0875b0e0c4306b03a52aff712c23d46c7 (patch) | |
tree | 4907223eceff5cfdd2556a5305f9a3c01801435f /src/basic/copy.c | |
parent | 1c5ed0e2b4923b12be52c9c3e8f43682403dcf32 (diff) | |
parent | 94a0ef6e572896140b8f28f688e881e198e2f2ab (diff) |
Merge pull request #3151 from keszybz/pr3149-2
Assorted fixes #3149 + one commit tacked on top
Diffstat (limited to 'src/basic/copy.c')
-rw-r--r-- | src/basic/copy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/copy.c b/src/basic/copy.c index 03487a6878..3001234a01 100644 --- a/src/basic/copy.c +++ b/src/basic/copy.c @@ -364,7 +364,7 @@ static int fd_copy_directory( q = fd_copy_symlink(dirfd(d), de->d_name, &buf, fdt, de->d_name); else if (S_ISFIFO(buf.st_mode)) q = fd_copy_fifo(dirfd(d), de->d_name, &buf, fdt, de->d_name); - else if (S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode)) + else if (S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode) || S_ISSOCK(buf.st_mode)) q = fd_copy_node(dirfd(d), de->d_name, &buf, fdt, de->d_name); else q = -EOPNOTSUPP; @@ -396,7 +396,7 @@ int copy_tree_at(int fdf, const char *from, int fdt, const char *to, bool merge) return fd_copy_symlink(fdf, from, &st, fdt, to); else if (S_ISFIFO(st.st_mode)) return fd_copy_fifo(fdf, from, &st, fdt, to); - else if (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)) + else if (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode) || S_ISSOCK(st.st_mode)) return fd_copy_node(fdf, from, &st, fdt, to); else return -EOPNOTSUPP; |