Merge pull request #714 from Techatrix/fs-completion-fix

fix file system completion crash
This commit is contained in:
Lee Cannon 2022-10-20 17:39:10 +01:00 committed by GitHub
commit 6358c5b23e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1434,7 +1434,7 @@ fn completeFileSystemStringLiteral(allocator: std.mem.Allocator, store: *const D
} }
var old = document_dir_path; var old = document_dir_path;
document_dir_path = document_dir_path.dir.openIterableDir(subpath, .{}) catch break :fsc // NOTE: Is this even safe lol? document_dir_path = document_dir_path.dir.openIterableDir(subpath, .{}) catch break :fsc; // NOTE: Is this even safe lol?
old.close(); old.close();
subpath_present = true; subpath_present = true;