projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: return error if not in overwrite mode and file exists
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
save.c
diff --git
a/src/bin/lttng-sessiond/save.c
b/src/bin/lttng-sessiond/save.c
index fd6c5d894e6f9a7ef099ba3a01088bb114bd870b..fe5461cb1e34f30fbd43b9c3b3018e28c6adc783 100644
(file)
--- a/
src/bin/lttng-sessiond/save.c
+++ b/
src/bin/lttng-sessiond/save.c
@@
-1478,7
+1478,8
@@
int save_session(struct ltt_session *session,
config_file_path[len] = '\0';
if (!access(config_file_path, F_OK) && !attr->overwrite) {
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;
}
goto end;
}
This page took
0.023362 seconds
and
4
git commands to generate.