s3_upload: improve url validation and error message
Ensure s3_upload correctly validates the S3 folder url by requiring it to end with /. This prevents wrong uploads to invalid paths, such as file urls. Also improve the error message. Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34255>
This commit is contained in:
@@ -127,7 +127,7 @@ replay_s3_upload_images() {
|
||||
__DESTINATION_FILE_PATH="$__S3_TRACES_PREFIX/${line##*-}"
|
||||
fi
|
||||
|
||||
s3_upload "$RESULTS_DIR/$__PREFIX/$line" "https://${__S3_PATH}/${__DESTINATION_FILE_PATH%/*}"
|
||||
s3_upload "$RESULTS_DIR/$__PREFIX/$line" "https://${__S3_PATH}/${__DESTINATION_FILE_PATH%/*}/"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user