chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
122eed2
)
fileio: imply /tmp as directory if passed as NULL to open_tmpfile_unlinkable()
author
Lennart Poettering
<lennart@poettering.net>
Mon, 25 Jul 2016 18:35:04 +0000
(20:35 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:13:01 +0000
(10:13 +0200)
We can make this smarter one day, to honour $TMPDIR and friends, but for now,
let's just use /tmp.
src/basic/fileio.c
patch
|
blob
|
history
diff --git
a/src/basic/fileio.c
b/src/basic/fileio.c
index 525cca73899c8b42331252302425cc4d595f04ea..42de50dcf628b0c3473ab940f90f33a786b96dea 100644
(file)
--- a/
src/basic/fileio.c
+++ b/
src/basic/fileio.c
@@
-1264,7
+1264,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 */