Lines 370-389
Link Here
|
370 |
{ |
370 |
{ |
371 |
InotifyWatch* pW = rEvt.GetWatch(); |
371 |
InotifyWatch* pW = rEvt.GetWatch(); |
372 |
IncronTabEntry* pE = FindEntry(pW); |
372 |
IncronTabEntry* pE = FindEntry(pW); |
|
|
373 |
std::string pW_path = pW->GetPath(); |
373 |
|
374 |
|
374 |
// no entry found - this shouldn't occur |
375 |
// no entry found - this shouldn't occur |
375 |
if (pE == NULL) |
376 |
if (pE == NULL) |
376 |
return; |
377 |
return; |
377 |
|
378 |
|
378 |
// discard event if user has no access rights to watch path |
379 |
// discard event if user has no access rights to watch path |
379 |
if (!(m_fSysTable || MayAccess(pW->GetPath(), DONT_FOLLOW(rEvt.GetMask())))) |
380 |
if (!(m_fSysTable || MayAccess(pW_path, DONT_FOLLOW(rEvt.GetMask())))) |
380 |
return; |
381 |
return; |
381 |
|
382 |
|
382 |
//#if 0 |
383 |
//#if 0 |
383 |
// log output for each dir + file + event |
384 |
// log output for each dir + file + event |
384 |
std::string events; |
385 |
std::string events; |
385 |
rEvt.DumpTypes(events); |
386 |
rEvt.DumpTypes(events); |
386 |
syslog(LOG_INFO, "PATH (%s) FILE (%s) EVENT (%s)", pW->GetPath().c_str() , IncronTabEntry::GetSafePath(rEvt.GetName()).c_str() , events.c_str()); |
387 |
syslog(LOG_INFO, "PATH (%s) FILE (%s) EVENT (%s)", pW_path.c_str() , IncronTabEntry::GetSafePath(rEvt.GetName()).c_str() , events.c_str()); |
387 |
//#endif |
388 |
//#endif |
388 |
|
389 |
|
389 |
// add new watch for newly created subdirs |
390 |
// add new watch for newly created subdirs |
Lines 422-428
Link Here
|
422 |
else { |
423 |
else { |
423 |
cmd.append(cs.substr(oldpos, pos-oldpos)); |
424 |
cmd.append(cs.substr(oldpos, pos-oldpos)); |
424 |
if (cs[px] == '@') { // base path |
425 |
if (cs[px] == '@') { // base path |
425 |
cmd.append(IncronTabEntry::GetSafePath(pW->GetPath())); |
426 |
cmd.append(IncronTabEntry::GetSafePath(pW_path)); |
426 |
oldpos = pos + 2; |
427 |
oldpos = pos + 2; |
427 |
} |
428 |
} |
428 |
else if (cs[px] == '#') { // file name |
429 |
else if (cs[px] == '#') { // file name |