From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 8CA7890892 for ; Mon, 12 Feb 2024 11:40:01 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6763F16D5D for ; Mon, 12 Feb 2024 11:39:31 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 12 Feb 2024 11:39:30 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 8A00E47988 for ; Mon, 12 Feb 2024 11:39:30 +0100 (CET) References: <20240212103040.222591-1-m.sandoval@proxmox.com> User-agent: mu4e 1.10.8; emacs 29.1 From: Maximiliano Sandoval To: Maximiliano Sandoval Cc: pbs-devel@lists.proxmox.com Date: Mon, 12 Feb 2024 11:37:53 +0100 In-reply-to: <20240212103040.222591-1-m.sandoval@proxmox.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-SPAM-LEVEL: Spam detection results: 0 AWL 0.002 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pbs-devel] [PATCH pbs-client v4] fix #3699: client: prefer xdg cache directory for tmp files X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2024 10:40:01 -0000 Maximiliano Sandoval writes: > Adds a helper to create temporal files in XDG_CACHE_HOME. If we cannot > create a file there, we fallback to /tmp as before. I just noticed that I didn't backtick the documentation of `create_tmp_file`: ```diff @@ -529,8 +529,8 @@ pub fn place_xdg_file( .with_context(|| format!("failed to place {} in xdg home", description)) } -/// Creates a temporary file (with O_TMPFILE) in XDG_CACHE_HOME. If we cannot -/// create the file there it will be created in /tmp instead. +/// Creates a temporary file (with `O_TMPFILE`) in `XDG_CACHE_HOME`. If we +/// cannot create the file there it will be created in `/tmp` instead. pub fn create_tmp_file() -> std::io::Result { static TMP_PATH: OnceLock = OnceLock::new(); let tmp_path = TMP_PATH.get_or_init(|| { ``` -- Maximiliano