Skip to content

Commit

Permalink
moved require out of use
Browse files Browse the repository at this point in the history
  • Loading branch information
andraasi committed Jun 10, 2024
1 parent ab9afe7 commit 4d485c6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ internal data class SimpleDspfConfig(var displayFilePath: String? = null) {

internal fun getMetadata(displayFile: String): FileMetadata {
val videoFile = File(displayFilePath, "$displayFile.dspf")
require(videoFile.exists()) { "$videoFile doesn't exist" }

return videoFile.bufferedReader().use { reader ->
require(videoFile.exists()) { "$videoFile doesn't exist" }
val dspf = DisplayFileParser.parse(reader)
val fields = dspf.getDbFields()

Expand Down

0 comments on commit 4d485c6

Please sign in to comment.