From 9675f920f440e88c540fbf91c98b162737604a1f Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Wed, 30 May 2018 21:21:23 -0600 Subject: [PATCH] BUG: libdcd now properly handles missing input file on Windows. --- package/MDAnalysis/lib/formats/libdcd.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/MDAnalysis/lib/formats/libdcd.pyx b/package/MDAnalysis/lib/formats/libdcd.pyx index afbb57c812a..812d6803c1e 100644 --- a/package/MDAnalysis/lib/formats/libdcd.pyx +++ b/package/MDAnalysis/lib/formats/libdcd.pyx @@ -292,6 +292,8 @@ cdef class DCDFile: self.close() if mode == 'r': + if not path.isfile(self.fname): + raise IOError("DCD file does not exist") fio_mode = FIO_READ elif mode == 'w': fio_mode = FIO_WRITE