file-util: allow specifying path separately in file_create_dated()

Instead of assuming the file prefix contains the path and filename
prefix, give these two items separately.

A NULL or empty string path may still be given to refer to the current
directory.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Aleksander Morgado
2018-01-23 01:05:21 +01:00
committed by Daniel Stone
parent e3c2a76d8f
commit 72032accbf
4 changed files with 16 additions and 10 deletions
+1 -1
View File
@@ -185,7 +185,7 @@ trigger_binding(struct weston_keyboard *keyboard, const struct timespec *time,
unpremultiply_and_swap_a8b8g8r8_to_PAMrgba(pixels, sz);
fp = file_create_dated(prefix, suffix, fname, sizeof(fname));
fp = file_create_dated(NULL, prefix, suffix, fname, sizeof(fname));
if (!fp) {
const char *msg;