]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Warn about old (0.5.x or earlier) on-disk afhi.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 21 May 2025 18:23:23 +0000 (20:23 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 22 May 2025 15:10:49 +0000 (17:10 +0200)
Nine years ago, starting with commit 234647bb5, old on-disk entries are
reported with a notice to re-add the file in order to update the audio file
table. Bump the loglevel for now, and add a comment to turn the check into
a hard error eventually.

aft.c

diff --git a/aft.c b/aft.c
index 4a4c46fc80eaa178c9544792d7aaa778f2651a23..b10e7bd174856feb9c74a557e94a902343ab468d 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -616,9 +616,10 @@ static int save_afd(struct audio_file_data *afd)
        buf = shm_afd;
        buf += sizeof(*afd);
        save_chunk_table(&afd->afhi, buf);
+       /* This check can be turned into a hard error after 0.8.0 */
        if (afd->afhi.max_chunk_size == 0) { /* v0.5.x on-disk afhi */
                set_max_chunk_size(&afd->afhi);
-               PARA_NOTICE_LOG("max chunk size unset, re-add required\n");
+               PARA_WARNING_LOG("max chunk size unset, re-add required\n");
        } else
                PARA_INFO_LOG("using max chunk size from afhi\n");
        afd->max_chunk_size = afd->afhi.max_chunk_size;