0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-19 19:42:24 +02:00

io_utils: use mp_mkostemps instead of mkstemp

This commit is contained in:
Kacper Michajłow 2024-05-01 20:14:23 +02:00
parent b647201795
commit 5c2918b4f3

View File

@ -63,7 +63,7 @@ bool mp_save_to_file(const char *filepath, const void *data, size_t size)
bool result = false;
char *tmp = talloc_asprintf(NULL, "%sXXXXXX", filepath);
int fd = mkstemp(tmp);
int fd = mp_mkostemps(tmp, 0, O_CLOEXEC);
if (fd < 0)
goto done;
FILE *cache = fdopen(fd, "wb");