diff --git a/src/io/csv_file.f90 b/src/io/csv_file.f90 index 16cfb98e80e..972dfe2bd55 100644 --- a/src/io/csv_file.f90 +++ b/src/io/csv_file.f90 @@ -310,9 +310,9 @@ function csv_file_count_lines(this) result(n) call this%check_exists() - open(file = trim(f%fname), status = 'old', newunit = file_unit, & + open(file = trim(this%fname), status = 'old', newunit = file_unit, & iostat = ierr) - if (ierr .ne. 0) call neko_error("Error while opening " // trim(f%fname)) + if (ierr .ne. 0) call neko_error("Error while opening " // trim(this%fname)) n = 0