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:
parent
ba4cc4bf35
commit
eb83ec2685
1 changed files with 0 additions and 1 deletions
|
|
@ -542,7 +542,6 @@ proc writeConfig*(dict: Config, filename: string) =
|
||||||
let file = open(filename, fmWrite)
|
let file = open(filename, fmWrite)
|
||||||
defer: file.close()
|
defer: file.close()
|
||||||
let fileStream = newFileStream(file)
|
let fileStream = newFileStream(file)
|
||||||
defer: fileStream.close()
|
|
||||||
dict.writeConfig(fileStream)
|
dict.writeConfig(fileStream)
|
||||||
|
|
||||||
proc getSectionValue*(dict: Config, section, key: string): string =
|
proc getSectionValue*(dict: Config, section, key: string): string =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue