Skip to content

Commit

Permalink
file connection correctly closed in detectInfusionScans
Browse files Browse the repository at this point in the history
  • Loading branch information
jasenfinch committed Feb 17, 2021
1 parent 907499a commit b18247a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions R/detect.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ detectInfusionScans <- function(files,

ms <- files %>%
future_map(~{
.x %>%
openMSfile() %>%
ms <- .x %>%
openMSfile()

file_header <- ms %>%
header()

close(ms)

return(file_header)
}) %>%
set_names(files)

Expand Down

0 comments on commit b18247a

Please sign in to comment.