mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
path-util: add generic ignore extension to the hidden files (#39554)
This commit is contained in:
@@ -277,6 +277,10 @@
|
||||
effective way to fully disable a unit, making it impossible to
|
||||
start it even manually.</para>
|
||||
|
||||
<para>Files (including directories) with names that match certain patterns are
|
||||
generally ignored. This includes names that start with a <literal>.</literal> or
|
||||
end with a <literal>.ignore</literal>.</para>
|
||||
|
||||
<para>The unit file format is covered by the
|
||||
<ulink url="https://systemd.io/PORTABILITY_AND_STABILITY/">Interface
|
||||
Portability and Stability Promise</ulink>.</para>
|
||||
|
||||
@@ -1304,6 +1304,7 @@ bool hidden_or_backup_file(const char *filename) {
|
||||
*/
|
||||
|
||||
return STR_IN_SET(dot + 1,
|
||||
"ignore",
|
||||
"rpmnew",
|
||||
"rpmsave",
|
||||
"rpmorig",
|
||||
|
||||
@@ -1202,6 +1202,7 @@ TEST(hidden_or_backup_file) {
|
||||
assert_se(hidden_or_backup_file("aquota.user"));
|
||||
assert_se(hidden_or_backup_file("aquota.group"));
|
||||
|
||||
assert_se(hidden_or_backup_file("test.ignore"));
|
||||
assert_se(hidden_or_backup_file("test.rpmnew"));
|
||||
assert_se(hidden_or_backup_file("test.dpkg-old"));
|
||||
assert_se(hidden_or_backup_file("test.dpkg-remove"));
|
||||
|
||||
Reference in New Issue
Block a user