Skip to content

Commit

Permalink
fix: close file (#521)
Browse files Browse the repository at this point in the history
* fix: close file

* Update changelog.md

---------

Co-authored-by: Wayback Archiver <[email protected]>
  • Loading branch information
testwill and waybackarchiver authored Jun 16, 2024
1 parent f49983f commit c8cacd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/wayback/wayback.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func readFromFile(s string) (urls []*url.URL) {
if err != nil {
return
}
defer file.Close()
scanner := bufio.NewScanner(file)
for scanner.Scan() {
uri, err := url.Parse(scanner.Text())
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Load the config file always ([#498](https://github.com/wabarc/wayback/pull/498))
- Signing RPM packages ([#507](https://github.com/wabarc/wayback/pull/507))
- Fix opened file not closing ([#521](https://github.com/wabarc/wayback/pull/521))

## [0.19.1] - 2023-03-21

Expand Down

0 comments on commit c8cacd7

Please sign in to comment.