summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/basic/path-util.c8
-rwxr-xr-xtest/sysv-generator-test.py5
2 files changed, 8 insertions, 5 deletions
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index bcf72913df..b2fa81a294 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -781,8 +781,8 @@ bool hidden_or_backup_file(const char *filename) {
* The generic suffixes "~" and ".bak" for backup files
* The generic prefix "." for hidden files
*
- * Thus, if a new package manager "foopkg" wants its own set of "foopkg-new", "foopkg-old", "foopkg-dist" or so
- * registered, let's refuse that and ask them to use "foopkg-new.bak" or "foopkg-new~" instead.
+ * Thus, if a new package manager "foopkg" wants its own set of ".foopkg-new", ".foopkg-old", ".foopkg-dist"
+ * or so registered, let's refuse that and ask them to use ".foopkg.new", ".foopkg.old" or ".foopkg~" instead.
*/
return STR_IN_SET(p + 1,
@@ -800,7 +800,9 @@ bool hidden_or_backup_file(const char *filename) {
"ucf-old",
"ucf-dist",
"swp",
- "bak");
+ "bak",
+ "old",
+ "new");
}
bool is_device_path(const char *path) {
diff --git a/test/sysv-generator-test.py b/test/sysv-generator-test.py
index aadc29ebeb..838dd57a6f 100755
--- a/test/sysv-generator-test.py
+++ b/test/sysv-generator-test.py
@@ -397,11 +397,12 @@ class SysvGeneratorTest(unittest.TestCase):
# backup files (not enabled in rcN.d/)
shutil.copy(script, script + '.bak')
shutil.copy(script, script + '.old')
+ shutil.copy(script, script + '.tmp')
+ shutil.copy(script, script + '.new')
err, results = self.run_generator()
print(err)
- self.assertEqual(sorted(results),
- ['foo.bak.service', 'foo.old.service', 'foo.service'])
+ self.assertEqual(sorted(results), ['foo.service', 'foo.tmp.service'])
# ensure we don't try to create a symlink to itself
self.assertNotIn('itself', err)