Skip to content

Commit e76424a

Browse files
authored
Merge pull request #831 from julia-vscode/fix-a-doc-del-bug
Fix a bug in remove_workspace_files
2 parents 1bd311b + bc055a3 commit e76424a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utilities.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ end
120120
# the include follow logic.
121121
function remove_workspace_files(root, server)
122122
for (uri, doc) in getdocuments_pair(server)
123+
# We first check whether the doc still exists on the server
124+
# because a previous loop iteration could have deleted it
125+
# via dependency removal of files
126+
hasdocument(server, uri) || continue
123127
fpath = getpath(doc)
124128
isempty(fpath) && continue
125129
get_open_in_editor(doc) && continue

0 commit comments

Comments
 (0)