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
@@ -53,7 +53,7 @@ weston_timeline_do_open(void)
const char *suffix = ".log";
char fname[1000];
timeline_.file = file_create_dated(prefix, suffix,
timeline_.file = file_create_dated(NULL, prefix, suffix,
fname, sizeof(fname));
if (!timeline_.file) {
const char *msg;