summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 1a8c03904c..67867dfbe9 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -3630,12 +3630,10 @@ static int load_from_path(Unit *u, const char *path) {
if (fstat(fileno(f), &st) < 0)
return -errno;
- if (null_or_empty(&st)) {
+ if (null_or_empty(&st))
u->load_state = UNIT_MASKED;
- u->fragment_mtime = 0;
- } else {
+ else {
u->load_state = UNIT_LOADED;
- u->fragment_mtime = timespec_load(&st.st_mtim);
/* Now, parse the file contents */
r = config_parse(u->id, filename, f,
@@ -3650,6 +3648,8 @@ static int load_from_path(Unit *u, const char *path) {
u->fragment_path = filename;
filename = NULL;
+ u->fragment_mtime = timespec_load(&st.st_mtim);
+
if (u->source_path) {
if (stat(u->source_path, &st) >= 0)
u->source_mtime = timespec_load(&st.st_mtim);