We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f90bef2 commit 3bbf39cCopy full SHA for 3bbf39c
src/core/generation.cpp
@@ -222,6 +222,11 @@ void EngineGeneration::onFileChanged(const QString& name) {
222
if (!this->watcher->files().contains(name)) {
223
this->deletedWatchedFiles.push_back(name);
224
} else {
225
+ // some editors (e.g vscode) perform file saving in two steps: truncate + write
226
+ // ignore the first event (truncate) with size 0 to prevent incorrect live reloading
227
+ auto fileInfo = QFileInfo(name);
228
+ if (fileInfo.isFile() && fileInfo.size() == 0) return;
229
+
230
emit this->filesChanged();
231
}
232
0 commit comments