Skip to content

Commit bab05eb

Browse files
committed
Handling windows style directories too...
filtering out builtin module file more accurately...
1 parent c535f67 commit bab05eb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/RelevanceStacktrace.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import Base: find_source_file, show_full_backtrace, StackFrame, fixup_stdlib_pat
33
stacktrace_expand_basepaths, stacktrace_contract_userdir, contractuser, something
44

55
const KNOWN_MODULES = ["VSCodeServer", "Core", "Distributed"]
6-
const KNOWN_MODULES_PATHS_1 = ["."]
7-
const KNOWN_MODULES_PATHS_2 = [".vscode", ".julia", "buildworker"]
6+
const KNOWN_MODULES_PATHS_BASE = ["."]
7+
const KNOWN_MODULES_PATHS = [".vscode", ".julia", "buildworker"]
88

99
is_project_file(modul, pathparts) = (
1010
!(string(modul) in KNOWN_MODULES) &&
11-
!(pathparts[1] in KNOWN_MODULES_PATHS_1) &&
12-
!(length(pathparts)>1 && pathparts[2] in KNOWN_MODULES_PATHS_2))
11+
!(pathparts[1] in KNOWN_MODULES_PATHS_BASE) &&
12+
!any(pathpart in KNOWN_MODULES_PATHS for pathpart in pathparts))
1313

1414
# This is useful because of
1515
function print_stackframe_relevance(io, i, frame::Base.StackFrame, n::Int, digit_align_width, modulecolordict, ownmodulescounter)

0 commit comments

Comments
 (0)