csync_exclude: Fix compile

csync_exclude.cpp:428:17: error: assigning to 'char *' from incompatible type 'const char *'
        bname = path;
                ^~~~

The C library's strrchr always return 'char*'
Only the C++'s std::strrchr has two overloads
This commit is contained in:
Olivier Goffart 2017-12-07 17:31:28 +01:00
parent 287670c9d6
commit e25af4f0dc

View file

@ -421,7 +421,7 @@ CSYNC_EXCLUDE_TYPE ExcludedFiles::traversalPatternMatch(const char *path, int fi
// Check the bname part of the path to see whether the full // Check the bname part of the path to see whether the full
// regex should be run. // regex should be run.
auto bname = strrchr(path, '/'); const char *bname = strrchr(path, '/');
if (bname) { if (bname) {
bname += 1; // don't include the / bname += 1; // don't include the /
} else { } else {