From a7ab9137ccb1e91a872f60ade1e26b310b78a1d4 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Sun, 30 Jul 2017 20:28:05 -0500 Subject: [PATCH] bug fix where temp file was not being properly closed. --- src/pyplot_module.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyplot_module.f90 b/src/pyplot_module.f90 index 396d876..0809d9f 100644 --- a/src/pyplot_module.f90 +++ b/src/pyplot_module.f90 @@ -907,7 +907,7 @@ subroutine execute(me, pyfile, istat) !delete the file (have to reopen it because !Fortran has no file delete function) open(newunit=iunit, file=file, status='OLD', iostat=istat) - if (istat/=0) close(iunit, status='DELETE', iostat=istat) + if (istat==0) close(iunit, status='DELETE', iostat=istat) end if if (istat/=0) then write(error_unit,'(A)') 'Error closing file.'