mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 22:13:29 +00:00
Remove redundant filestream.close, causes crash (#5907)
File is already being closed by defer: file.close() closing it twice causes crash.
This commit is contained in:
@@ -542,7 +542,6 @@ proc writeConfig*(dict: Config, filename: string) =
|
||||
let file = open(filename, fmWrite)
|
||||
defer: file.close()
|
||||
let fileStream = newFileStream(file)
|
||||
defer: fileStream.close()
|
||||
dict.writeConfig(fileStream)
|
||||
|
||||
proc getSectionValue*(dict: Config, section, key: string): string =
|
||||
|
||||
Reference in New Issue
Block a user