From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH backup v3 2/2] http_client: add warning when we fail to place a config file
Date: Wed, 16 Apr 2025 14:56:51 +0200 [thread overview]
Message-ID: <20250416125651.334868-2-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20250416125651.334868-1-m.sandoval@proxmox.com>
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
pbs-client/src/http_client.rs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pbs-client/src/http_client.rs b/pbs-client/src/http_client.rs
index 4f525f2ec..ba9892218 100644
--- a/pbs-client/src/http_client.rs
+++ b/pbs-client/src/http_client.rs
@@ -348,7 +348,12 @@ fn load_ticket_info(prefix: &str, server: &str, userid: &Userid) -> Option<(Stri
let base = BaseDirectories::with_prefix(prefix).ok()?;
// usually ~/.config/<prefix>/tickets
- let path = base.place_config_file("tickets").ok()?;
+ let path = base
+ .place_config_file("tickets")
+ .inspect_err(|err| {
+ warn!("could not place tickets file in the user's config directory: {err}")
+ })
+ .ok()?;
let data = file_get_json(path, None).ok()?;
let now = proxmox_time::epoch_i64();
let ticket_lifetime = proxmox_auth_api::TICKET_LIFETIME - 60;
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-04-16 12:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-16 12:56 [pbs-devel] [PATCH backup v3 1/2] http_client: store tickets in the user's config directory Maximiliano Sandoval
2025-04-16 12:56 ` Maximiliano Sandoval [this message]
2025-04-18 12:46 ` Thomas Lamprecht
2025-04-18 12:47 ` Maximiliano Sandoval
2025-04-18 13:14 ` Thomas Lamprecht
2025-04-18 13:20 ` Maximiliano Sandoval
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250416125651.334868-2-m.sandoval@proxmox.com \
--to=m.sandoval@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal