Fixing recently introduced bugs
diff --git a/gui/fs-watcher.cc b/gui/fs-watcher.cc
index 7eff410..18b6f77 100644
--- a/gui/fs-watcher.cc
+++ b/gui/fs-watcher.cc
@@ -60,7 +60,7 @@
bind (&FsWatcher::ScanDirectory_NotifyRemovals_Execute, this, m_dirPath),
"r-" + m_dirPath.toStdString ()); // only one task will be scheduled per directory
- Scheduler::scheduleOneTimeTask (m_scheduler, 0.5,
+ Scheduler::scheduleOneTimeTask (m_scheduler, 1,
bind (&FsWatcher::ScanDirectory_NotifyUpdates_Execute, this, m_dirPath),
m_dirPath.toStdString ()); // only one task will be scheduled per directory
}
@@ -76,9 +76,6 @@
_LOG_DEBUG ("Triggered DirPath: " << dirPath.toStdString ());
filesystem::path absPathTriggeredDir (dirPath.toStdString ());
- dirPath.remove (0, m_dirPath.size ());
-
- filesystem::path triggeredDir (dirPath.toStdString ());
if (!filesystem::exists (filesystem::path (absPathTriggeredDir)))
{
Scheduler::scheduleOneTimeTask (m_scheduler, 0.5,
@@ -129,7 +126,7 @@
void
FsWatcher::ScanDirectory_NotifyUpdates_Execute (QString dirPath)
{
- // _LOG_TRACE (" >> ScanDirectory_NotifyUpdates_Execute");
+ _LOG_TRACE (" >> ScanDirectory_NotifyUpdates_Execute");
// exclude working only on last component, not the full path; iterating through all directories, even excluded from monitoring
QRegExp exclude ("^(\\.|\\.\\.|\\.chronoshare|.*~|.*\\.swp)$");
@@ -147,6 +144,7 @@
QFileInfo fileInfo = dirIterator.fileInfo ();
QString name = fileInfo.fileName ();
+ _LOG_DEBUG ("+++ Scanning: " << name.toStdString ());
if (!exclude.exactMatch (name))
{