public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: Maximiliano Sandoval <m.sandoval@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: Re: [pbs-devel] [PATCH pbs-client v4] fix #3699: client: prefer xdg cache directory for tmp files
Date: Mon, 12 Feb 2024 11:37:53 +0100	[thread overview]
Message-ID: <s8oy1bqdl0e.fsf@proxmox.com> (raw)
In-Reply-To: <20240212103040.222591-1-m.sandoval@proxmox.com>



Maximiliano Sandoval <m.sandoval@proxmox.com> 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<std::fs::File> {
     static TMP_PATH: OnceLock<std::path::PathBuf> = OnceLock::new();
     let tmp_path = TMP_PATH.get_or_init(|| {
```


--
Maximiliano




      reply	other threads:[~2024-02-12 10:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-12 10:30 Maximiliano Sandoval
2024-02-12 10:37 ` Maximiliano Sandoval [this message]

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=s8oy1bqdl0e.fsf@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal