From 5f81bacc005fca1be379a105aab7c17b57f8bd58 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 27 Nov 2018 23:52:45 +0100 Subject: [PATCH] Fix more issues with paths in the database. --- main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 3aebe5a..95b3ff8 100644 --- a/main.cpp +++ b/main.cpp @@ -166,7 +166,12 @@ FrameOnDisk write_frame(int stream_idx, int64_t pts, const uint8_t *data, size_t } } } - db->store_frame_file(filename, size, frames_this_file); + + const char *basename = filename.c_str(); + while (strchr(basename, '/') != nullptr) { + basename = strchr(basename, '/'); + } + db->store_frame_file(basename, size, frames_this_file); } return frame; -- 2.39.2