(Re-)adding detection of added files. Recent change has postponed that by 5 minutes
Change-Id: Ic77bc62df3b7d11444908075149c4cbfc0bf844d
diff --git a/gui/fs-watcher.cc b/gui/fs-watcher.cc
index a4b46ef..18d004d 100644
--- a/gui/fs-watcher.cc
+++ b/gui/fs-watcher.cc
@@ -163,9 +163,17 @@
// _LOG_DEBUG ("Attempt to add path to watcher: " << absFilePath.toStdString ());
m_watcher->addPath (absFilePath);
- if (notifyCallbacks && fileInfo.isFile ())
+ if (fileInfo.isFile ())
{
- DidFileChanged (absFilePath);
+ QString relFile = absFilePath;
+ relFile.remove (0, m_dirPath.size ());
+ filesystem::path aFile (relFile.toStdString ());
+
+ if (notifyCallbacks ||
+ !m_fileState->LookupFile (aFile.relative_path ().generic_string ()) /* file does not exist there, but exists locally: added */)
+ {
+ DidFileChanged (absFilePath);
+ }
}
}
else