Skip to content

Commit

Permalink
Fix missing cross references on newly saved file (#13066)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtmok authored and Tim Mok committed May 1, 2023
1 parent 639c5e2 commit d1d90d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cpp/session/modules/quarto/SessionQuartoXRefs.cpp
Expand Up @@ -374,8 +374,8 @@ json::Array resolvedXRefIndex(const FilePath& renderedIndexPath, const FilePath&
srcXrefs = indexSourceFile(unsaved.get(), filename);
}
// otherwise, check to see if the src file is more recent than the renderedIndexPath
else if ((srcPath.getLastWriteTime() > renderedIndexPath.getLastWriteTime()) ||
!renderedIndexPath.exists())
else if (!renderedIndexPath.exists() || renderedIndexPath.getSize() == 0 ||
(srcPath.getLastWriteTime() > renderedIndexPath.getLastWriteTime()))
{
srcXrefs = indexSourceFile(srcPath, filename);
}
Expand Down

0 comments on commit d1d90d8

Please sign in to comment.