Skip to content

Commit 56c05b2

Browse files
committed
Concatenate rootdir to filepath
1 parent 085b2f6 commit 56c05b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ static void watch_callback(dmon_watch_id watch_id, dmon_action action, const cha
1616
(void)(user);
1717
(void)(watch_id);
1818
string rootdirstr = rootdir;
19-
string filepathstr = filepath;
19+
string filepathstr = rootdirstr + filepath;
2020
string oldfilepathstr;
2121
if (oldfilepath != NULL) {
22-
oldfilepathstr = oldfilepath;
22+
oldfilepathstr = rootdirstr + oldfilepath;
2323
}
24-
string msg = "{\"rootdir\":\"" + rootdirstr + "\",\"filepath\":\"" + filepathstr + "\",";
24+
string msg = "{\"filepath\":\"" + filepathstr + "\",";
2525

2626
switch (action) {
2727
case DMON_ACTION_CREATE:

0 commit comments

Comments
 (0)