From ec9eb54d2f36f9c98607b5fc8745f978cfebd63e Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Mon, 14 May 2018 02:40:06 +0100 Subject: support non extents and fast symlinks --- src/clone_data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/clone_data.c') diff --git a/src/clone_data.c b/src/clone_data.c index 3083914..24aaf62 100644 --- a/src/clone_data.c +++ b/src/clone_data.c @@ -44,9 +44,10 @@ int clone_data (ext2_filsys src_fs, ext2_filsys dst_fs, ext2_ino_t i_num, struct file_len -= offset; - if (len > file_len) + if ((len > file_len) || (!len)) len = file_len; + while (len) { fetch = len > BUF_SZ ? BUF_SZ : len; -- cgit v1.2.3