s3:utils/smbget abort recursive download on error
authorChristian Ambach <ambi@samba.org>
Mon, 8 Feb 2016 22:25:04 +0000 (23:25 +0100)
committerChristian Ambach <ambi@samba.org>
Fri, 26 Feb 2016 10:31:32 +0000 (11:31 +0100)
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/utils/smbget.c

index 24f26b07c459666f42d832d156af38728fedf3a6..79574177cf09314b375414333b723fcf0790e665 100644 (file)
@@ -254,6 +254,12 @@ static bool smb_download_dir(const char *base, const char *name, int resume)
                                newname, dirent->smbc_type);
                        break;
                }
+
+               if (!ok) {
+                       fprintf(stderr, "Failed to download %s: %s\n",
+                               newname, strerror(errno));
+                       return false;
+               }
                free(newname);
        }
        free(tmpname);