[GCS] Allow upload of the entire directory to GS

Allow users to upload the entire directory by providing . or ./ as the
path.

R=jojwang@google.com

Bug: 343199633
Change-Id: Idf2a6b27577bb9ef153e096f00367084daab9239
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5578674
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
changes/74/5578674/2
Josip Sokcevic 11 months ago committed by LUCI CQ
parent a85dcffff4
commit f318db0055

@ -213,6 +213,10 @@ def main():
# Enumerate our inputs.
input_filenames = get_targets(args, parser, options.use_null_terminator)
# Allow uploading the entire directory
if len(input_filenames) == 1 and input_filenames[0] in ('.', './'):
input_filenames = next(os.walk('.'))[1]
if len(input_filenames) > 1 or (len(input_filenames) == 1
and os.path.isdir(input_filenames[0])):
if not validate_archive_dirs(input_filenames):

Loading…
Cancel
Save