Thanks. It fixes the issues, pushed.
On 08/07/2013 01:56 PM, Jakub Filak wrote:
Not sure what is the plan for ticket #657 but I think that abrtd
must
ensure that dump location directory exists. abrtd will use inotify until
we find a better solution.
This feature was added in commit
79ab220934b8e593922bda3eb1450d11584d00b3 and accidentally disabled in
commit d37f500e3954e95de20c18c373e3a664d7f55d8d
This commit fixes broken test abrtd-directories
Related to #657
Signed-off-by: Jakub Filak <jfilak(a)redhat.com>
---
src/daemon/abrtd.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
index 5586953..2af55a5 100644
--- a/src/daemon/abrtd.c
+++ b/src/daemon/abrtd.c
@@ -41,7 +41,7 @@
/* Maximum number of simultaneously opened client connections. */
#define MAX_CLIENT_COUNT 10
-#define IN_DUMP_LOCATION_FLAGS (IN_CREATE | IN_MOVED_TO | IN_DELETE_SELF |
IN_MOVE_SELF)
+#define IN_DUMP_LOCATION_FLAGS (IN_DELETE_SELF | IN_MOVE_SELF)
/* Daemon initializes, then sits in glib main loop, waiting for events.
* Events can be:
@@ -724,8 +724,7 @@ int main(int argc, char** argv)
perror_msg_and_die("inotify_init failed");
close_on_exec_on(inotify_fd);
-#if 0
- /* Watching 'g_settings_dump_location' for new files and delete self
+ /* Watching 'g_settings_dump_location' for delete self
* because hooks expects that the dump location exists if abrtd is running
*/
if (inotify_add_watch(inotify_fd, g_settings_dump_location, IN_DUMP_LOCATION_FLAGS)
< 0)
@@ -733,7 +732,6 @@ int main(int argc, char** argv)
perror_msg("inotify_add_watch failed on '%s'",
g_settings_dump_location);
goto init_error;
}
-#endif
/* ...and upload dir */
if (g_settings_sWatchCrashdumpArchiveDir)
{
--
Richard Marko