#include "catalog.h"
#include "compress.h"
#include "dirent-util.h"
+#include "env-file.h"
#include "escape.h"
#include "fd-util.h"
#include "fileio.h"
#include "list.h"
#include "lookup3.h"
#include "missing.h"
+#include "nulstr-util.h"
#include "path-util.h"
#include "process-util.h"
#include "replace-var.h"
#include "stat-util.h"
-#include "stat-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
/* Adds a journal file directory to watch. If the directory is already tracked this updates the inotify watch
* and reenumerates directory contents */
- if (dirname)
- path = strjoin(prefix, "/", dirname);
- else
- path = strdup(prefix);
+ path = path_join(prefix, dirname);
if (!path) {
r = -ENOMEM;
goto fail;
hashmap_remove(j->directories_by_wd, INT_TO_PTR(d->wd));
if (j->inotify_fd >= 0)
- inotify_rm_watch(j->inotify_fd, d->wd);
+ (void) inotify_rm_watch(j->inotify_fd, d->wd);
}
hashmap_remove(j->directories_by_path, d->path);