mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
fileio: imply /tmp as directory if passed as NULL to open_tmpfile_unlinkable()
We can make this smarter one day, to honour $TMPDIR and friends, but for now, let's just use /tmp.
This commit is contained in:
parent
91fe95e158
commit
87410f166e
@ -1259,7 +1259,8 @@ int open_tmpfile_unlinkable(const char *directory, int flags) {
|
||||
char *p;
|
||||
int fd;
|
||||
|
||||
assert(directory);
|
||||
if (!directory)
|
||||
directory = "/tmp";
|
||||
|
||||
/* Returns an unlinked temporary file that cannot be linked into the file system anymore */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user