From: Steinar H. Gunderson Date: Tue, 27 Nov 2018 22:52:45 +0000 (+0100) Subject: Fix more issues with paths in the database. X-Git-Tag: 1.8.0~76^2~2 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5f81bacc005fca1be379a105aab7c17b57f8bd58;p=nageru Fix more issues with paths in the database. --- 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;