Fix: don't ask data pending if session was not started
[lttng-tools.git] / src / bin / lttng-sessiond / save.c
index fd6c5d894e6f9a7ef099ba3a01088bb114bd870b..812137f93f40b1257f6b2973a993f35af6e763cf 100644 (file)
@@ -25,7 +25,6 @@
 #include <common/defaults.h>
 #include <common/error.h>
 #include <common/config/config.h>
-#include <common/config/config-session-internal.h>
 #include <common/utils.h>
 #include <common/runas.h>
 #include <lttng/save-internal.h>
@@ -1478,7 +1477,8 @@ int save_session(struct ltt_session *session,
        config_file_path[len] = '\0';
 
        if (!access(config_file_path, F_OK) && !attr->overwrite) {
-               /* A file with the same name already exists, skip */
+               /* File exists, notify the user since the overwrite flag is off. */
+               ret = LTTNG_ERR_SAVE_FILE_EXIST;
                goto end;
        }
 
This page took 0.024057 seconds and 4 git commands to generate.