Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rust: Proposed improved solution.
  • Loading branch information
geoffw0 committed Apr 9, 2026
commit e72c1166640ddddfae86897cf24443da0dc90dd7
4 changes: 2 additions & 2 deletions rust/ql/lib/codeql/files/FileSystem.qll
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ extensible predicate additionalExternalFile(string relativePath);
/** A file. */
class File extends Container, Impl::File {
pragma[nomagic]
private string getRelativePath0() { result = this.getRelativePath() }
private predicate isAdditionalExternalFile() { additionalExternalFile(this.getRelativePath()) }

/**
* Holds if this file was extracted from the source code of the target project
* (rather than another location such as inside a dependency).
*/
predicate fromSource() {
exists(ExtractorStep s | s.getAction() = "Extract" and s.getFile() = this) and
not additionalExternalFile(this.getRelativePath0())
not this.isAdditionalExternalFile()
}

/**
Expand Down
Loading