diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-22 13:14:25 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-22 13:14:25 -0400 |
| commit | c21360db73c9bf14e80f7f2f80f798674f89f891 (patch) | |
| tree | 6c4e0830ba00b02f9745e1bb995cb95e5dc4c82a | |
| parent | 5bd79db81ed04f3e8b6e1c936893d182f504498d (diff) | |
| download | stasis-c21360db73c9bf14e80f7f2f80f798674f89f891.tar.gz | |
artifactory_download_cli: Add more SYSDEBUG statements
| -rw-r--r-- | src/lib/core/artifactory.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/core/artifactory.c b/src/lib/core/artifactory.c index d452248..f70c0b8 100644 --- a/src/lib/core/artifactory.c +++ b/src/lib/core/artifactory.c @@ -78,7 +78,13 @@ int artifactory_download_cli(char *dest, SYSDEBUG("%s", "Construct path to write data"); const char *remote_filename_fmt = "/%s"; int remote_filename_fmt_len = snprintf(NULL, 0, remote_filename_fmt, remote_filename); - snprintf(path + strlen(path), sizeof(path) - remote_filename_fmt_len, remote_filename_fmt, remote_filename); + SYSDEBUG("path buffer contents: '%s'", path); + SYSDEBUG("path buffer size: %zu", sizeof(path)); + SYSDEBUG("path strlen: %zu", strlen(path)); + SYSDEBUG("remote_filename_fmt_len: %d", remote_filename_fmt_len); + SYSDEBUG("maxlen for snprintf: %zu", sizeof(path) - strlen(path) - remote_filename_fmt_len); + + snprintf(path + strlen(path), sizeof(path) - strlen(path) - remote_filename_fmt_len, remote_filename_fmt, remote_filename); char *errmsg = NULL; SYSDEBUG("%s", "Downloading..."); long fetch_status = download(url, path, &errmsg); |
