Skip to content

TickIT: why did tic replaces line fail? #4

@wkitty42

Description

@wkitty42

when TickIT is processing a tic file with a replaces line and the replaces file name doesn't match the file name being replaced, the error reported is slightly confusing. confusing in that is seems to indicate there is no replaces line. "no matching replaces line" is true but the read can be taken two different ways. in this case, there is a replaces line but the file name is bad so there's no match which also makes the line true.

anyway, i have a small patch to add two more lines to the tickit log when this happens. it should allow us to easier see the problem of no matching replaces lines. in the case i used when doing this, it was a comma instead of a dot in the file name in the replaces line. an easy fix once it is seen.

--- tickit-orig.js      2018-10-06 13:47:36.080727040 -0400
+++ tickit.js   2018-12-08 12:30:10.932543767 -0500
@@ -172,6 +172,8 @@
        if (file_exists(path+tic.file) && !force_replace && !force_replace_area) {
                if (tic.replaces === undefined || !wildmatch(tic.file, tic.replaces)) {
                        log(LOG_ERROR, "'"+tic.full_path+"' already exists in '"+path+"' and TIC does not have matching Replaces line.");
+                       log(LOG_ERROR, "    tic.file     = "+tic.file);
+                       log(LOG_ERROR, "    tic.replaces = "+tic.replaces);
                        return false;
                }
                else {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions