diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index 58b93c58..a402f9f4 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -529,6 +529,8 @@ static int io_all(void *fd, void *buf, int count, int do_write) if (i < 0) { if (errno != EAGAIN && errno != EINTR) return -1; + } else if (i == 0 && !do_write && opt.restore_image) { + return -1; } else { count -= i; buf = i + (char *) buf;