naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
84b277
From 45914d5301d694730965872962fc71b9d11f9b3d Mon Sep 17 00:00:00 2001
84b277
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
84b277
Date: Sat, 31 May 2014 21:36:23 +0200
84b277
Subject: [PATCH] util: ignore_file should not allow files ending with '~'
84b277
84b277
ignore_file currently allows any file ending with '~' while it
84b277
seems that the opposite was intended:
84b277
a228a22fda4faa9ecb7c5a5e499980c8ae5d2a08
84b277
84b277
(cherry-picked from 93f1a06374e335e8508d89e1bdaadf45be6ab777)
84b277
84b277
Resolves: #1147524
84b277
---
84b277
 src/shared/util.c | 2 +-
84b277
 1 file changed, 1 insertion(+), 1 deletion(-)
84b277
84b277
diff --git a/src/shared/util.c b/src/shared/util.c
84b277
index 9f25b15..1590c3a 100644
84b277
--- a/src/shared/util.c
84b277
+++ b/src/shared/util.c
84b277
@@ -1502,7 +1502,7 @@ bool ignore_file(const char *filename) {
84b277
         assert(filename);
84b277
 
84b277
         if (endswith(filename, "~"))
84b277
-                return false;
84b277
+                return true;
84b277
 
84b277
         return ignore_file_allow_backup(filename);
84b277
 }