Ignore backup files ending with tilde (Unix/Linux convention)
On Linux, some text editors create a backup of the file currently edited, and give the backup file the name of the original file plus a tilde. This file is generally removed once the file is saved.
In author mode with live reload, the following error can be thrown by Antora:
{ [Error: ENOENT: no such file or directory, lstat '/path/to/blog.yuzutech.fr/blog/modules/ROOT/pages/file.adoc~' in /path/to/blog.yuzutech.fr (ref: file <worktree> | path: blog)]
errno: -2,
code: 'ENOENT',
syscall: 'lstat',
path:
'/path/to/blog.yuzutech.fr/blog/modules/ROOT/pages/file.adoc~' }
I believe the reason is that the backup file is removed during Antora processing.
I think it would be better to ignore backup files (files ending with ~
) since in most cases, the user doesn't want to publish/process backup files.